SpringBoot使用
Spring Boot的核心特点 ·微服务: 使用Spring Boot可以生成独立的微服务功能单元 ·自动配置: 针对很多Spring应用程序常见的应用功能,Spring Boot能自动提供相关配置 ·起步依赖: 告诉Spring Boot需要什么功能,它就能引入需要的库。 ·命令行界面: 这是Spring Boot的可选特性,借此你只需写代码就能完成完整的应用程序,无需传统项目构建。 ·Actuator: 让你能够深入运行中的Spring Boot应用程序。 创建一个项目 第一步:首先要配置Spring Boot 依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.9.RELEASE</version> </parent> Spring Boot的版本仲裁中心;以后我们导入依赖默认是不需要写版本。(没有在dependencies里面管理的依赖自然需要声明版本号) <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web<