Spring Boot Hello World
We will start with building our first Spring Boot application in this chapter. We will use Maven to manage dependencies.
The following steps are involved in starting up with a Spring Boot application:
- Configure
spring-boot-starter-parent
in yourpom.xml
file. - Configure the
pom.xml
file with the required starter projects. - Configure
spring-boot-maven-plugin
to be able to run the application. - Create your first Spring Boot launch class.
Let's start with step 1: configuring the starter projects.
Configure spring-boot-starter-parent
Let's start with a simple pom.xml
file with spring-boot-starter-parent
:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mastering.spring</groupId> <artifactId>springboot-example...