Creating your first Spring Initializr project

We will use the full version and enter the values, as follows:

Things to note are as follows:

  • Build tool: Maven
  • Spring Boot version: Choose the latest available
  • Group: com.mastering.spring
  • Artifact: first-spring-initializr
  • Selected dependencies: Choose Web, JPA, Actuator and Dev Tools. Type in each one of these in the textbox and press Enter to choose them. We will learn more about Actuator and Dev Tools in the next section
  • Java version: 1.8

Go ahead and click on the Generate Project button. This will create a .zip file and you can download it to your computer.

The following screenshot shows the structure of the project created:

We will now import this project into your IDE. In Eclipse, you can perform the following steps:

  1. Launch Eclipse.
  2. Navigate to File | Import.
  3. Choose the existing Maven projects.
  4. Browse and select the folder that is the root of the Maven project (the one containing the pom.xml file ).
  5. Proceed with the defaults and click on Finish.

This will import the project into Eclipse. The following screenshot shows the structure of the project in Eclipse:

Let's look at some of the important files from the generated project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset