Making an SSR Web App with Spring Boot
March 01, 2019
The project from this article can be found here
In this series, we’re going to be walking through making a web application using Spring Boot. The application we will be developing will be a web-based inventory application for a fictional publishing house called Literate Octo Dollop. The author will be using Eclipse as an IDE but you are free to use whichever IDE you are most comfortable with. If you already have a project setup and imported, you can skip to part 2.
- A Java IDE (I’ll be using Eclipse)
- A working knowledge of Spring Boot
- Git-Bash (Windows environments only) or Terminal
- Gradle >= v5
The first thing we need to do is get a Spring project to work on. Let’s head over to the Spring Initializr. Here we’ll need to make some changes and add some dependencies.
- Make sure that project type is set to
Gradleand language is set to
- Enter your Group Id:
- Enter your Artifact Name:
- Add the dependencies we’ll be using (Web, DevTools, Thymeleaf, JPA, H2)
- Click Generate Project
Once your project downloads, extract it from the zip file and navigate to it from your command line. Once in the root of your project, let’s build out our project and import it into our IDE.
From the root directory of your project:
build.gradlein a text editor of your choice and add
id 'eclipse'to the
pluginsblock and save.
- From your command line, run
- Pending a successful build, import into your IDE of choice
Now that our project is imported, we need to make sure everything is up and running correctly. Open the Application file and run it from your IDE. As long as your server starts without error, we’re all good and ready to get started.
Time to move on to Part 2