1. 程式人生 > >在springboot中實現熱部署

在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

修改文字檔案中的內容,儲存時,系統重啟。