在springboot中实现热部署

热部署官方地址: https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#using-boot-devtools

在pom.xml文件中添加如下配置 

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

  当保存代码时,则系统会快速重新启动。

配置的静态资源文件不会被监听重启。

在配置文件中取消 特别文件的配置 spring.devtools.restart.exclude=application.properties

手工触发器 spring.devtools.restart.trigger-file=trigger.txt

修改文本文件中的内容,保存时,系统重启。

猜你喜欢

转载自www.cnblogs.com/wwh/p/10179426.html