2019-10-09 idea搭建springboot
一、


application.properties 文件
server.port=8081 spring.datasource.url=jdbc:mysql://localhost:3306/housesale spring.datasource.username=root spring.datasource.password=root spring.datasource.driverClassName=com.mysql.jdbc.Driver #"关闭缓存, 即时刷新" spring.freemarker.cache=false #spring.thymeleaf.cache=true 如果开启此处会导致每次输入删除都会自动刷新哪怕你没保存 #热部署生效 spring.devtools.restart.enabled=true #设置重启的目录,添加那个目录的文件需要restart spring.devtools.restart.additional-paths=src/main/java spring.devtools.restart.exclude=WEB-INF/**
test类
//将这个类设置为只返回json数据 @RestController @RequestMapping("/test") public class TestUrl { @RequestMapping("/run") public String run(){ return "success"; } }
然后开启项目后,

二、实现热部署
https://blog.csdn.net/chachapaofan/article/details/88697452

浙公网安备 33010602011771号