版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_36092584/article/details/80303403
1.spring boot简介
Spring Boot 的优点快速开发,特别适合构建微服务系统,另外给我们封装了各种经常使用的套件,比如mybatis、hibernate、redis、mongodb等。
2.spring Hello World(maven方式)
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
@SpringBootApplication
@RestController
public class App
{
public static void main( String[] args )
{
SpringApplication.run(App.class, args);
}
@RequestMapping("/")
String home() {
return "Hello World!";
}
}