添加依赖java
<dependencies> <!-- 方便调试依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins> </build>
修改IDE配置参数spring
Mac快捷键:shift+alt+command+/,选择Registrymaven
Window快捷键:Shift+Ctrl+Alt+/,选择Registryspring-boot
测试成功了,可是该一点代码,就重启一下,并且很慢,很差用,你会受不了的。测试