添加依賴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
測試成功了,可是該一點代碼,就重啓一下,並且很慢,很差用,你會受不了的。測試