gpt4 book ai didi

java - Spring boot Maven 项目每次都必须更新才能看到 ECLIPSE IDE 的变化

转载 作者:行者123 更新时间:2023-12-02 06:17:46 27 4
gpt4 key购买 nike

我在 Spring Boot 中使用 thymeleaf,每次我想看到更改时,我的 index.html 位于 src/main/resources/template 中,我必须停止服务器,更新项目,然后重新运行应用程序,这是非常低效的,我只想运行和刷新,我将 devtools 添加到我的依赖项中,并设置了 spring.thymeleaf.cache= false 但它仍然不起作用

最佳答案

编辑启动器依赖项并添加 devtools 选项,这样每次更改时它都会重新启动。

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

关于java - Spring boot Maven 项目每次都必须更新才能看到 ECLIPSE IDE 的变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55856690/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com