Setting Up
Base POM
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.6.RELEASE</version>
<relativePath />
</parent>Starters
These dependencies are used to set up the application automatically.
For example this prepares a MVC project:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>While this adds and allows running an embedded Tomcat:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>Configuration Class
The SpringBootApplication annotation combines several configuration annotations.
For a web application:
This should be a runnable class, meaning it requires the run method:
Last updated
Was this helpful?