<!--熱部署--> <dependency> <groupId>org.springframework.boot</groudId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
#熱部署生效 spring.devtools.restart.enabled=true #設置重啓的目錄
<!--熱部署--> <dependency> <groupId>org.springframework.boot</groudId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency>
新建 resource.propertiesjava
@configuration @configurationProperties @PropertySource(value = 'classpath:resource.properties') public class Resource{}
server.port=8088 server.context-path = /IMooc server.session-timeout = 60
###tomcat 相關的配置 server.tomcat.uri-encoding=UTF-8