Appendix G. Spring Initializr

G.1. Creating a New Spring Boot Project

Here are a couple of convenient ways to create a Spring Boot project which you might find useful when you return to your workplace.

[Warning] Warning
This section is for reference, you do not need to do this as part of the lab. Any project you create this way now will not compile because STS is in offline mode and you won't have all the dependencies you need.

G.1.1. New Starter Project

In STS you can create a new Spring Boot project using File -> New -> Spring Starter Project. If Spring Starter Project is not there, use File -> New -> Other -> Spring -> Spring Starter Project instead:

New starter project

Figure G.1. New starter project



Either runs a wizard that allows you to select the Spring modules that you want (such as Web, REST, Security, JPA and so on) and generates a customized project. We already did this for you to create the spring-boot project used in the lab.

Define project and select Spring modules

Figure G.2. Define project and select Spring modules



G.1.2. Spring Initializr

If you don't normally use STS, you can do the same thing by going online to https://start.spring.io/:

Spring Initializr web-page

Figure G.3. Spring Initializr web-page



Specify the modules you want (if you switch to the "full version" you can use checkboxes to select the modules you want just like in the STS wizard in Figure G.2). When you hit Generate Project it creates a zip file to download. Unpack and import the project into your IDE.

When you return to your workplace you might like to try one of these for yourself.