Why Spring Boot?2 min read

spring-by-pivotal

Ever since Spring Framework came, coders/developers around the world had to really struggle out with the numerous configurations that was to be done in the XML’s and also please don’t forgot the tiresome task of selecting the correct version of required dependencies, In short, lots n lots of usable hours were getting wasted on useless tasks.

Some of the shortcomings of the Spring Framework are:

1. Spring is kinda hard to troubleshoot, meaning; as spring adds various wrappers around most of its functionalities, it takes considerable time and energy to find the real issue using logs.

2. Dependency Injection; really a hoax, Spring focuses on using DI, but as you move deeper into Spring, your project becomes dependent on Spring Framework, and thus in later stages, it becomes almost impossible to move out of Spring-based development.

3. Gigantic: you wouldn’t really like to have tons of jars into your small home project, i.e. as your project grows in size and functionality, the baggage of Jars/Libraries keeps on adding.

So, What did guys at Spring do to make Spring even better; let’s check it out:

  • Firstly, they added a server(Tomcat, Jetty or Undertow) in Spring boot jars itself, so no need to deploy your war to any server, you can directly run your project from your main class.

    Boot_Startup

    *Notice, just running your main classes causes Tomcat server to start.

  • Opinionated ‘starter’ dependencies that further simplify our build configuration. *In the figure below, notice there is a tag, it simply inherits defaults from Spring Boot.
    spring-boot-starter-parentDependency_Starter.PNG
  • Inbuilt production-grade features to help us with monitoring and application management(metrics, health checks, Externalized configuration). Just by enabling the below dependency, we can have it all.
    spring-boot-starter-actuator
  • Almost none XML configuration needed and no code generation needed.
  • Ability to create absolute Stand Alone Application.

If you are interested more on Spring Boot; like its latest version, updates. Please check out the below video of Spring Boot Ver 2.0 webinar.

2 thoughts on “Why Spring Boot?2 min read

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.