1 前言
上一篇写了 Spirng整合SpringMVC
这一篇写一下SpringBoot的一点知识。因为比较简单,就直接分点写了。
1.静态资源放在src/main/resource/static中,直接写html,使用jsp需要额外的包。
2.使用SpringBoot启动后访问时不加项目名。
3.json可以使用@RestController注解
4.热部署
<!-- 开启springboot的tomcat热部署 true就是开启 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
5.文档:https://spring.io/projects/spring-boot
项目生成:https://start.spring.io/