I planned to write article about Spring Boot more than a year ago. Finally I have a time and inspiration for this. So prepare yourself for 10 – 15 minutes of high quality Spring tutorial. I’m going to demonstrate Spring Boot basics with Gradle and embedded Tomcat. I use Intellij IDEA instead of Eclipse but this shouldn’t be a problem for those of you who used to Eclipse.

Introduction to Spring Boot

What’s my goal? I want to develop something very similar to on of my previous tutorials about Spring and Java configurations. It’s a good exercise to compare two different approaches for Spring development.No doubt, most of you know what is the main aim of Spring Boot. For the rest of readers I want to say that Spring Boot makes developers happier because it takes care of configurations meanwhile developer can focus on code production. For more details read official reference.

Gradle build file

For managing dependencies and build of the project I use Gradle. Here is howbuild.gradle file looks:

Run Spring Boot application

The last thing which we have to do in this tutorial is launch of the application. Hence I use Gradle, and in our build.gradle file I specified that the application need to be package as WAR file – I need to run build and run war file.Here is how it looks like in IDEA: