Spring Boot修改HTML等文件后,如何实现不重启即时生效?
- 内容介绍
- 文章标签
- 相关推荐
本文共计374个文字,预计阅读时间需要2分钟。
在`pom.xml`中添加Spring Boot DevTools依赖,并设置以下两项配置:
xml org.springframework.boot spring-boot-devtools true
一、spring-boot-devtools
在pom中直接引入依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
设置以下两项(第一项如已设置直接设置第二项)
1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
本文共计374个文字,预计阅读时间需要2分钟。
在`pom.xml`中添加Spring Boot DevTools依赖,并设置以下两项配置:
xml org.springframework.boot spring-boot-devtools true
一、spring-boot-devtools
在pom中直接引入依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
设置以下两项(第一项如已设置直接设置第二项)
1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。

