What are the disadvantages of Spring Boot for Java web applications?

UserF40 picture UserF40 · Jul 28, 2016 · Viewed 14.9k times · Source

[This needs to be voted to be reopened to answer.]

Spring boot is tipped as being the default go to when making a new spring application as it makes set up easier and automatically wires in common dependencies.

I am yet in industry to see spring-boot used in the manner advertised.

Factually and concisely, what are the disadvantages that are faced by developers on adoption of Spring boot as the de facto Spring go to?

The advantages of Spring Boot question shows advantages of which I agree there are many, but believe there should be a rounder view.

An example non opinion based point would be:

  • Spring boot may unnecessarily increase the deployment binary size with unused dependencies.

  • Not being able to customize logging easily as shown here.

Answer

Grzegorz Gajos picture Grzegorz Gajos · Jul 28, 2016

This is a very opinion based question but I believe that the biggest disadvantage that you might encounter is using it or Spring at all without understanding what value it gave to you or your project. It might be completely not aligned with your requirements and it is possible that you will configure everything by yourself at some point.

Let me comment bullet points that you liked in the question.

  • Create stand-alone Spring applications => You can create standalone java application? Why Spring at the first place?
  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files) => What if you have to build war anyway? Little config will do the trick but it's not any major advantage.
  • Provide opinionated 'starter' POMs to simplify your Maven configuration => What if you have many legacy spring modules? What if you need to patch it up?
  • Automatically configure Spring whenever possible => What if this configuration is completely not aligned with your requirements?
  • Provide production-ready features such as metrics, health checks, and externalized configuration => Is it sufficient for you? Is it completely wrong, as you need something more sophisticated? Useless, as you don't need this at all?