SpringBoot热加载

开发工具

Maven+SpringBoot2.1.3+jdk10+Idea
主要步骤
STEP1 构建SpringBoot项目.
具体流程如下:filenewprojectSpringInitializr选择服务URLnext设置GruopArtifact左右均选择Web.
STEP2 设置pom.xml文件,并添加相应依赖.具体如下:
1、添加Spring-boot-devtools依赖

值得注意的是:图中<optional>标签配置不可省略
2
设置插件spring-boot-maven-plugin

STEP3设置自动编译. 为了使热加载在SpringBoot项目中生效. 需进行automatically配置, 主要包括两方面.
1、FileSettingsBuild,Execution,DeploymentCompiler勾选Buildprojectautomatically确定

2、Ctrl+Shift+A搜索Registry并选择Registry….勾选compiler.automake.allow.when.app.running

点击获取项目代码

原文地址:https://www.cnblogs.com/accumulating/p/10445153.html