idea 使用services

问题描述

在启动微服务的时候控制台没有Services窗口
在这里插入图片描述

期望结果

在这里插入图片描述

解决办法

一、在【View】如果找得到Services选项

直接点击选项中的Services即可解决
在这里插入图片描述

二、在【View】如果找不到Services选项

在这里插入图片描述
(1)方案一:直接配置
在编辑Run/Debug Configurations中的Templates添加+Spring Boot,然后Apply即可调出services窗口
在这里插入图片描述
在这里插入图片描述
如果没有解决不了,就进行下面的修改配置文件

(2)方案二:修改idea的workspace.xml配置

1)找到 .idea > workspace.xml (注:.idea是隐藏文件)
在这里插入图片描述

2)将workspace.xml RunDashboard 替换成如下,然后重启即可

<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>

 
 

    ————————————————
    版权声明:本文为CSDN博主「佳德_Boy」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/Boy_Martin/article/details/128344277

    ### IntelliJ IDEA 2023 Services Window Usage In IntelliJ IDEA 2023, the **Services** tool window provides an interface for managing various services within projects. This includes running and debugging applications as well as interacting with external tools like databases or cloud environments. To access the **Services** window: - Navigate through `View` -> `Tool Windows` -> `Services`, or press `Alt + 8`. For storing configuration settings related to these services temporarily without roaming across different machines, one should utilize the `PropertiesComponent`. The service allows saving both application-level and project-level values but disables roaming capabilities ensuring configurations remain local[^1]. When working with specific services such as database connections or remote servers from this window, users might encounter common issues including connection failures due to incorrect credentials or network problems. Ensuring correct setup of environment variables and proper firewall permissions could mitigate some connectivity challenges. Additionally, developers may face performance bottlenecks when handling large datasets via integrated terminals inside the IDE; optimizing queries and limiting data fetch sizes are recommended practices here. ```java // Example Java code snippet demonstrating how to store a value using PropertiesComponent. import com.intellij.openapi.components.ServiceManager; import com.intellij.ide.util.PropertiesComponent; public class ServiceExample { public static void main(String[] args) { PropertiesComponent properties = ServiceManager.getService(PropertiesComponent.class); properties.setValue("exampleKey", "value"); } } ```
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值