Christophe Labouisse bio photo

Christophe Labouisse

Freelance Java expert, Docker enthusiast

Email Twitter Google+ LinkedIn Github Stackoverflow Hopwork

Spring Boot is one of the latests projects of the Spring galaxy. I discovered at the Bordeaux JUG during a session by Sébastien Deleuze. The main features are: creation of standalone applications, simplified configuration and fast startup but there is more.


Everybody knows Spring, many had work with Spring, for some if was good, for others less good. I wrote Spring galaxy above and that might be a valid metaphor. Sometime I feel that taking a trendy technical word and prefixing it with Spring gives an actual Spring project. Let’s try:

So do we need Yet Another Spring Project?

Hello World!

So to give a try to Spring Boot I decided to follow the tutorial. In order to have a rest service replying Hellow World! we only need two files: a Java file and a pom.xml (the use of gradle is also supported and described in the documentation).

The Java file is pretty short actually 5 lines of code or annotation, not so bad:

public class Example {

    String home() {
        return "Hello World!";

    public static void main(String[] args) throws Exception {, args);


For the build we are a tiny pom.xml with one parent, one dependency and one plugin:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""





Keep in mind that we still have Spring MVC underneath and to measure the feat that is done by Spring Boot, have a look here or there to see how a Spring MVC Hello World tutorial looks like.

To run the project you only need to have Java installed:

mvn package # if needed
java -jar target/springboot-hello-0.0.1-SNAPSHOT.jar


Writing a Hello World! following the documentation is hardly testing a framework. But, for what I saw, I really have the impression that Spring Boot is a big step in the right direction: self contained executable jars out of the box, a very effective simplification either on the code or the build, and some nice features related to configuration, monitoring (easy integration of CRaSH).


I spoke about Docker earlier telling that there is not need for a Spring-Docker project and it is not really needed since a Dockerfile would be something like:

FROM java

ADD target/springboot-hello-0.0.1-SNAPSHOT.jar /tmp/application.jar

ENTRYPOINT ["java", "", "-jar", "/tmp/application.jar"]