SpringBoot 是构建在 SpringMVC 基础上的新一代 Web 开发框架。相比 SpringMVC,SpringBoot 的配置更简单,上手更容易,因此受到了开发者们的欢迎。
    SpringBoot内置了Tomcat,不需要配置Servlet了, 然后

    1. <parent>
    2. <groupId>org.springframework.boot</groupId>
    3. <artifactId>spring-boot-starter-parent</artifactId>
    4. <version>1.5.3.RELEASE</version>
    5. </parent>
    6. <dependencies>
    7. <dependency>
    8. <groupId>org.springframework.boot</groupId>
    9. <artifactId>spring-boot-starter-web</artifactId>
    10. </dependency>
    11. <!-- ... -->
    12. </dependencies>

    创建新 SpringBoot 应用:

    @SpringBootApplication
    public class MySpringBootApplication {
        public static void main(String[] args) {
            SpringApplication.run(applicationClass, args);
        }
    
        private static Class<MySpringBootApplication> applicationClass = MySpringBootApplication.class;
    }