Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

[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.

like image 262
UserF40 Avatar asked Jul 28 '16 09:07

UserF40


People also ask

What is the disadvantage of spring boot?

Disadvantages of Spring BootLarge deployment files that result from unused dependencies. The long amount of time that it takes to replace legacy systems with Spring Boot applications. Its inability to build large, monolithic applications (although it works extremely well for developing microservices)

When should you not use spring boots?

When you have a large number of different web apps, it can make sense to let the knowledge on that part only in the production team. In that case, you would not use Spring boot. On the other end, if the hosting is externalized, Spring boot allows to give a full package.

What are the pros and cons of using spring boot?

Spring Boot helps developers to start coding right away without wasting time on preparing and configuring the environment. In contrast to other Java frameworks, it provides flexible XML configurations, robust batch processing, database transactions, easy workflow, along with a wide variety of tools for development.

Is spring boot good for web development?

Spring boot Java Programming – specialities It has in-built language security features embedded by Java Compiler and the machine making it trustworthy especially for web development. It also employs robust code which lets your application development consider all cases of errors with the help of a code.


1 Answers

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?
like image 172
Grzegorz Gajos Avatar answered Oct 17 '22 18:10

Grzegorz Gajos