1. 设置“File” 》 Settings 》 Build,Execution,Deplyment 》Compiler,勾选 Build project automatically

springboot项目IDEA修改文件无需重启的方法

2. 使用组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,找到key “compiler.automake.allow.when.app.running” 并勾选(如果是通过mvn clean spring-boot:run 命令启动项目的话是不用设置这个的,但是如果是通过主类main方法启动的话是必须要设置

springboot项目IDEA修改文件无需重启的方法

springboot项目IDEA修改文件无需重启的方法

3. pom.xml加上依赖

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

 

 

相关文章:

  • 2021-12-06
  • 2021-04-10
  • 2021-07-08
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-10-15
猜你喜欢
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案