本博客简要介绍一下SpringBoot在IDEA软件配置热部署

IDEA自动make配置
目的是开启IDEA自动make功能
File->Setting->Build,Execution,Deployment->Complier,勾选Build Project automatically,ps:我这里是IDEA2017版本,不同版本名称可能不一样
SpringBoot热部署配置

快捷键:Ctrl+Shift+A,然后输入Registry,找到compiler.automake.allow.when.app.running并勾选
SpringBoot热部署配置

SpringBoot maven配置
maven加上jar

<!-- 热部署-->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<optional>true</optional>
		</dependency>

maven build插件配置,记得将fork配置为true

<!-- 开启热部署-->
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<fork>true</fork>
				</configuration>
			</plugin>

配置好之后,还是需要重启一下IDEA的,然后修改java文件还是配置文件都会自动重启的,注意:Chrome浏览器可能有缓存,可以去按F12关了

相关文章:

  • 2022-12-23
  • 2021-08-12
  • 2021-08-24
  • 2021-09-11
  • 2021-07-07
  • 2021-12-15
  • 2022-01-15
猜你喜欢
  • 2021-05-16
  • 2021-12-28
  • 2021-12-08
  • 2021-05-18
  • 2021-08-15
  • 2022-02-15
  • 2022-12-23
相关资源
相似解决方案