最近在学习spring cloud,跟着视频添加run dashboard,发现里面介绍的方法无法适用于idea community(社区版)。
然后自己研究了一下,成功添加,下面分享自己的方法。
如图,我的项目里添加了两个module,我想通过run dashboard同时启动这两个module
注:每个module都有@SpringBootApplication主方法
pom:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

1.如图找到View -> Tool Windows -> Services

2.找到左下角的Services面板,点击Add Service -> Run Configuration Type

- 选择Application

- module就自动出现在面板中了,点击Run. (鼠标选中Application再Run,就会启动下面的所有module,选中某一个module则只会启动选中的那个)

注:如果Application下面没有module,可以单独Run一下module:

再重新Add Service -> Application 就可以看到了
- 这时我们能看到两个module都同时启动啦

虽然不是出现 Run Dashboard按钮,但是效果是一样的。如果你也使用idea community,希望能帮到你。