maven
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>runtime</scope> </dependency>
修改后访问
原因:idea还没完成编译工作前,DevTools就开始进行重启和加载添加配置延迟devtolls等待时间properties
spring.devtools.restart.poll-interval=5000ms
yml
spring: devtools: restart: poll-interval: 5000ms