The easiest way to create a new Spring Boot project is the Initializr (http://start.spring.io). In this blog I want to show you how easy it is to create new projects with this tool.
You can choose the following options:
- Build system (Maven / Gradle)
- Spring Boot version (if you chose a 2.x-SNAPSHOT you can use Spring Framework 5 features)
- Group and artifact
- Dependencies (you have to know the name like Web, Actuator or JPA – in the full screen version all dependencies are shown at the bottom)
- Additional In the full screen version:
- name, description, package name
- packaging (jar / war)
- java version (1.6, 1.7, 1.8)
- language (Java / Groovy / Kotlin)
When you have chosen all Spring Boot Starters you start the creation process by clicking „Generate Project“. This produces a zip file that will be automatically downloaded. Unzip the project in your favorite IDE and start coding.
The project contains a basic class with the @SpringBootApplication annotation and the main method. A first test class checks the context loading of Spring.