SpringBoot 是构建在 SpringMVC 基础上的新一代 Web 开发框架。相比 SpringMVC,SpringBoot 的配置更简单,上手更容易,因此受到了开发者们的欢迎。
SpringBoot内置了Tomcat,不需要配置Servlet了, 然后
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- ... -->
</dependencies>
创建新 SpringBoot
应用:
@SpringBootApplication
public class MySpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(applicationClass, args);
}
private static Class<MySpringBootApplication> applicationClass = MySpringBootApplication.class;
}