java - Spring boot maven 项目每次都必须更新才能看到变化 ECLIPSE IDE
问题描述
我在 Spring Boot 中使用 thymeleaf,index.html
每次src/main/resources/template
我想看到更改时,我都必须停止服务器,更新项目,然后重新运行应用程序,这是非常低效的,我只想运行和刷新,我添加了devtools
到我的依赖项并设置spring.thymeleaf.cache= false
它仍然无法正常工作
解决方案
根据https://dzone.com/articles/spring-boot-application-live-reload-hot-swap-with如果您使用 Intellij,您应该编辑注册表。
打开设置 --> 构建-执行-部署 --> 编译器
并启用自动生成项目。
然后按 ctrl+shift+A 并搜索注册表。在注册表中,启用以下配置。
compiler.automake.allow.when.app.running
- 重新启动 IDE。
推荐阅读
- c - 有人可以解释以下代码的函数pop(更具体地说是变量retval)吗?
- scala - When should one use a Kleisli?
- qt - 每次构建项目时如何运行 AUTOMOC、AUTOUIC 和 AUTORCC?
- .net - 在 WinForms 项目中包含仅 64 位程序集
- mysql - MYSQL - 左连接查询未按预期工作
- c# - 如何让我的计时器到小数点后两位?
- python - 如何处理 Python 子进程`FileNotFoundError: [WinError 2]`?
- c# - C# listBox 的大小应该小于
- matplotlib - 为 matplotlib 转换时间戳以进行数据可视化
- html - 导航栏元素堆叠在一起,我希望它们彼此相邻