Spring - Running an app with Springboot vs standard Spring framework
With Spring Boot
Spring Boot is dedicated to running standalone Spring applications, the same as simple Java applications, with the java -jar command.
In a springboot application, we can include spring-boot-starter-web, which embeds a web container into our application.
Spring Boot brings in auto-configuration, dependency version management, active profiles, etc.
Standard Spring configuration
With standard Spring configuration, we do not embed a web container into the application, but deploy it as a WAR file on the web container.
One of the main features of microservices is independence from other microservices. In this case, it is clear that they should not share common resources, such as databases or web containers. Deploying many WAR files on one web container is an anti-pattern for microservices.
TODO
https://www.turing.com/kb/spring-vs-spring-boots-best-web-apps https://www.baeldung.com/spring-vs-spring-boot
Reading material
- https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#web
- https://spring.io/blog/2014/03/07/deploying-spring-boot-applications