⑤. 热部署Devtools(开发阶段)
①. adding devtools to your project
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
②. adding plugin to your pom.xml(添加聚合父类总工程的pom.xml)
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin> </plugins> </build>
③. Enabling automatic build(开启自动编译的选项)
④. Update the value of(更新值)
Ctrl+Shift+A打开全局搜索搜registry
⑤. 重启Idea
⑥. 测试Run DashBord
①. 运用spring cloud框架基于spring boot构建微服务,一般需要启动多个应用程序,在idea开发工具中,多个同时启动的应用需要在RunDashboard运行仪表盘中可以更好的管理,但有时候idea中的RunDashboard窗口没有显示出来,也找不到直接的开启钮;idea中打开Run Dashboard的方法如下:
view > Tool Windows > Run Dashboard
②. 在workspace.xml中添加如下配置
<component name="RunDashboard"> <option name="configurationTypes"> <set> <option value="SpringBootApplicationConfigurationType"/> </set> </option> <option name="ruleStates"> <list> <RuleState> <option name="name" value="ConfigurationTypeDashboardGroupingRule"/> </RuleState> <RuleState> <option name="name" value="StatusDashboardGroupingRule"/> </RuleState> </list> </option> </component>