美文网首页
idea 2020 设置了自动编译,SpringBoot 热部署

idea 2020 设置了自动编译,SpringBoot 热部署

作者: 林深雾雨 | 来源:发表于2020-09-25 00:22 被阅读0次

我这里遇到的问题是:

  • 引入了spring-boot-devtools,
  • 设置了idea的自动编译
  • 勾选了Registry中的complier.automake.allow.when.app.running后均无效
    <mark style="box-sizing: border-box; outline: 0px; background-color: rgb(248, 248, 64); color: rgb(0, 0, 0); overflow-wrap: break-word;">SpringBoot版本:2.1.6.RELEASE</mark>

如何解决:

在application.yml配置文件中加入如下配置即可:
(application.properties同理)

spring:
  devtools:
    restart:
      # 设置热部署生效
      enabled: true
      # 设置重启目录
      additional-paths: src/main/java

相关文章

网友评论

      本文标题:idea 2020 设置了自动编译,SpringBoot 热部署

      本文链接:https://www.haomeiwen.com/subject/uldxuktx.html