0

I have an interesting decision to take for my project. We use spring boot for our micro services.

The development environment is spring boot wíth tomcat in the embedded mode. However, I am not sure if there are any advantages/ drawbacks if I choose this way in production too. The counter argument is to deploy a war in a separate tomcat. I am not able to think on any buying points for both views

What will be the best choice for a large enterprise production system on cloud(jar/war)?

I saw some recommendations here (but I need more stronger reasons to chosse/ not choose any one): Spring boot embedded container or war file in an external container for production

1 Answer 1

1

here are my points to use fat jar for production deployment.

  1. fat jars are simple to build and deploy.

  2. Spring Boot aims to be production ready, by default. This means that it ships with useful defaults out of the box that may be overriden, if necessary.

  3. Fat JARs are good for running as the microservices as managing microservices is already a burden then why one more step to configure and deployment should be considered.

  4. fat jar can also run as a java service easy to manage by a single command, restart server/jvm can be managed automatically.

  5. Spring boot is Embedded with- Tomcat, Jetty and Undertow so changing app server for any micro services is not a big deal.

Sign up to request clarification or add additional context in comments.

2 Comments

However, while going embedded we miss the control of the tomcat instance from Spring Boot, which means all your server.* properties become useless.
Tomcat can be customized by spring.tomcat properties and some of sever properties still can be customized like port, connection timeout, etc , please see common properties defined in spring boot.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.