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:


Related Whitepaper:

Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions

Get ready to program in a whole new way!

Functional Programming in Java will help you quickly get on top of the new, essential Java 8 language features and the functional style that will change and improve your code. This short, targeted book will help you make the paradigm shift from the old imperative way to a less error-prone, more elegant, and concise coding style that’s also a breeze to parallelize. You’ll explore the syntax and semantics of lambda expressions, method and constructor references, and functional interfaces. You’ll design and write applications better using the new standards in Java 8 and the JDK.

Get it Now!  

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

− 3 = six

Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
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.

Sign up for our Newsletter

20,709 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books