gpt4 book ai didi

spring - 热插拔不适用于使用 Intellij 和 spring-boot-starter-web 的 Spring 引导

转载 作者:行者123 更新时间:2023-11-28 22:24:58 25 4
gpt4 key购买 nike

我的 spring boot 微服务使用 spring-boot-starter-web,我正尝试在 intellij 中启用热插拔。我尝试添加此依赖项:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>

然后在 Intellij I 中:

在编译器设置中选中“自动构建项目”和检查 compiler.automake.allow.when.app.running 框并重新启动 Intellij

我运行了我的微服务,然后更改了一个 Controller 文件,但什么也没发生……有什么想法吗?是因为我正在使用 spring-boot-starter-web 并因此使用嵌入式 Tomcat 吗?

谢谢!

最佳答案

除了您已经遵循的步骤之外,您是否介意也这样做?这似乎已经回答了here .

试一试,让我知道它是否也适用于您的情况!

更新compiler.automake.allow.when.app.running的值

Ctrl+Shift+A 并搜索注册表。在注册表中,启用:compiler.automake.allow.when.app.running

关于spring - 热插拔不适用于使用 Intellij 和 spring-boot-starter-web 的 Spring 引导,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50054204/

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