spring - 热插拔不适用于 Intellij 和 spring-boot-starter-web 的 Spring Boot
问题描述
我的 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
我运行了我的微服务,然后更改了一个控制器文件,但什么也没发生……有什么想法吗?是 b/c 我使用的是 spring-boot-starter-web 并因此嵌入了 Tomcat 吗?
谢谢!
解决方案
除了您已经遵循的步骤之外,您是否也介意这样做?这似乎已经在这里得到了回答。
试一试,让我知道它是否也适用于您的情况!
更新值compiler.automake.allow.when.app.running
按Ctrl
++Shift
并A
搜索注册表。在注册表中,启用: compiler.automake.allow.when.app.running
推荐阅读
- excel - 如何使用 WPS office 或任何其他工具在每个不同列中创建等效于 explode() 的集合数据
- r - 我如何正确地将条形图和折线图重叠在一起
- sql-server - 将 650 万条记录从平面文件加载到 OleDb 目标(即数据库表)的性能更好
- macos - Powershell Core 读取文件元数据
- c++ - 使用单例模板时如何使用g ++编译多个cpp文件
- go - 如何使用 Golang 从 Azure eventthub 获取架构
- google-cloud-platform - 暂时禁用此应用的 Google 登录 - Google OAuth
- java - concatColumn 弹出 UnsupportedOperationException
- html - 具有四个浮动 div 的响应式布局
- python - 如果值包含特定子字符串,如何从列值中删除单词?