Smitha R
Smitha R

Reputation: 1

What is recommended while using spring boot in production deployment (jar/war)

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

Upvotes: 0

Views: 1848

Answers (1)

kj007
kj007

Reputation: 6254

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.

Upvotes: 1

Related Questions