SpringBoot配置热部署

1. 在Idea中配置自动build project

File >> Settings >> Build, Execution, Deployment >> Compiler >> 勾选 'Build project automatically', 点击OK保存

SpringBoot配置热部署_第1张图片

SpringBoot配置热部署_第2张图片

2. 快捷键ctrl + shift + alt + '/' 配置Registry

SpringBoot配置热部署_第3张图片

勾选compiler.automake.allow.when.app.running

SpringBoot配置热部署_第4张图片

3. 在pom中添加 spring-boot-devtools 依赖


	org.springframework.boot
	spring-boot-devtools
    2.6.8

在plugin下面添加configuration标签,设置fork为true


	
		
			org.springframework.boot
			spring-boot-maven-plugin
			
				true
			
		
	

你可能感兴趣的:(Spring,Boot,java,spring,boot)