Spring Boot – foundation for modern Java application

Spring Boot is relatively new project from Spring.io. Its aim is to simplify creating new Spring Framework based projects and unify their configuration by applying some conventions. This approach convention over configuration is already successfully applied in most of so called modern web frameworks like Ruby on Rails, Django or Play! Framework.

On the official website we can find primary goals:
 
 
 
 

  • Provide a radically faster and widely accessible getting started experience for all Spring development
  • Be opinionated out of the box, but get out of the way quickly as requirements start to diverge from the defaults
  • Provide a range of non-functional features that are common to large classes of projects (e.g. embedded servers, security, metrics, health checks, externalized configuration)
  • Absolutely no code generation and no requirement for XML configuration

Spring-Boot is not just another Spring Framework component. It’s actually much more. It’s a base, foundation for most (maybe even all) next Spring based applications you are going to write.

Spring Framework itself is very powerful tool. It can do a lot of things for you and if it can’t – it plays nice with most of other frameworks in Java world. It suffers one thing – it is difficult to start coding in Spring and it’s often blamed for complexity. Indeed – boostraping complexity was a price you pay for wide feture set and flexibility you can achive. That explains huge popularity of blog posts like Spring configuration with annotations, Spring without web.xml etc. There are just A LOT of ways to bootstrap Spring (which is actually good).

It happened that price paid was too high – especially when such flexibility was not really needed. I believe that’s how frameworks like Dropwizard and Play! Framework were born.

Ok, so what actually does Spring Boot do?

  • simplifies project initial configuration – it is easier to start now with Spring than with Rails!
  • project portability out of the box – you can build your project to JAR with embedded Tomcat or Jetty as well as classic WAR and deploy it to any application server or cloud service
  • power-ups your development speed – mvn spring-boot:run starts embedded Tomcat with Spring in seconds. Combined with JRebel let see changes you made immediately
  • provides starters – dramatically easy integration with all Spring Framework family components. For example, if you want to use AOP just include spring-boot-starter-aop and you are good to go: all necessary dependencies are configuration is there
  • makes it easy to start application for functional/integration tests needs: SpringApplication.run(Application.class, args); in @Before method and your application is ready for Selenium or any other kind of real working application tests. You can forget about deploying application to container during pre-integration-test phase
  • provides basic metrics, health check and other nice features like remote shell support via CRaSH – hell yeah – you can now SSH to your application

Spring Boot is still under development. The latest version is 0.5.0 M7 and it is definitely ready for playing around and prototyping. Stable version will be released in the beginning of this year so don’t waste any time and have a look on Spring Guides introducing basic usage.

My recommendations for further reading/watching:

 

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

JPA Mini Book

Learn how to leverage the power of JPA in order to create robust and flexible Java applications. With this Mini Book, you will get introduced to JPA and smoothly transition to more advanced concepts.

JVM Troubleshooting Guide

The Java virtual machine is really the foundation of any Java EE platform. Learn how to master it with this advanced guide!

Given email address is already subscribed, thank you!
Oops. Something went wrong. Please try again later.
Please provide a valid email address.
Thank you, your sign-up request was successful! Please check your e-mail inbox.
Please complete the CAPTCHA.
Please fill in the required fields.

One Response to "Spring Boot – foundation for modern Java application"

  1. Pawan Kumar says:

    Can u help me how to develope a web application using spring boot + hibernate + mysql.
    And can u tell me the basic difference between spring boot and spring framework 4.

Leave a Reply


× 7 = sixty three



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy | Contact
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close