解决idea spring boot 修改html等不重启即时生效的问题
作者:---江北 时间:2023-11-13 18:37:47
一、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” 。
2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”
补充:彻底解决springboot修改页面和代码会自动重启
1.解决修改代码会重启:
导入jar包
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
2.设置启动arguments
-javaagent:F:\m2\m3\repository\org\springframework\springloaded\1.2.8.RELEASE\springloaded-1.2.8.RELEASE.jar -noverify
VM arguments这里的放springloaded-1.2.8.RELEASE.jar的绝对路径
3.application.yml配置
1.解决thymeleaf修改代码重启问题
导入jar包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2.application.yml配置
spring.thymeleaf.cache=false
以上为个人经验,希望能给大家一个参考。
来源:https://www.cnblogs.com/jiangbei/p/8439394.html
标签:idea,springboot,html,生效
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
详解Java异常处理的使用与思考
2022-05-13 12:34:51
![](https://img.aspxhome.com/file/2023/6/84186_0s.png)
C#文件下载实例代码(适用于各个浏览器)
2022-12-28 06:25:48
Gradle的缓存路径修改的四种方法(小结)
2021-11-09 11:05:51
![](https://img.aspxhome.com/file/2023/4/130424_0s.png)
c#创建windows服务(Windows Services)详细步骤
2023-06-11 19:05:22
Android判断和监听底座状态和类型的方法介绍
2022-03-27 09:33:30
关于java关键字this和super的区别和理解
2022-08-01 14:33:09
![](https://img.aspxhome.com/file/2023/2/63052_0s.png)
Android自定义SwipeLayout仿QQ侧滑条目
2023-12-06 14:24:25
![](https://img.aspxhome.com/file/2023/3/130353_0s.gif)
Java开发完整短信验证码功能的全过程
2023-05-05 15:35:24
![](https://img.aspxhome.com/file/2023/7/92557_0s.png)
ShardingSphere jdbc集成多数据源的实现步骤
2023-11-25 07:54:56
![](https://img.aspxhome.com/file/2023/6/59766_0s.png)
JAVA WSIMPORT生成WEBSERVICE客户端401认证过程图解
2023-11-14 00:27:55
![](https://img.aspxhome.com/file/2023/5/58985_0s.png)
Jmeter生成UUID作为唯一标识符过程图解
2022-09-17 03:35:36
![](https://img.aspxhome.com/file/2023/2/113242_0s.png)
C# 创建高精度定时器的示例
2023-03-09 12:35:58
![](https://img.aspxhome.com/file/2023/4/76434_0s.png)
C#调用带结构体指针Dll的方法
2022-06-14 19:55:32
Java Callable接口实现细节详解
2023-11-10 05:34:26
![](https://img.aspxhome.com/file/2023/5/58995_0s.png)
C#程序中session值的保存方法以及转为字符串的方法总结
2023-04-21 03:44:59
c# 实例——绘制波浪线(附源码)
2023-03-02 12:53:54
![](https://img.aspxhome.com/file/2023/7/116537_0s.gif)
Android Studio实现简易登录界面制作
2023-08-25 08:49:42
![](https://img.aspxhome.com/file/2023/8/99778_0s.jpg)
Unity实现打砖块游戏
2023-12-06 04:45:04
![](https://img.aspxhome.com/file/2023/2/102172_0s.jpg)
c# AES字节数组加密解密流程及代码实现
2021-12-11 21:44:20
![](https://img.aspxhome.com/file/2023/7/94537_0s.png)
C#实现为一张大尺寸图片创建缩略图的方法
2021-08-03 21:07:15