spring-boot-starter-remote-shell不可用

一:

1、在springBoot历史版本中支持:SSH监控。在pom.xml添加如下依赖即可:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-remote-shell</artifactId>

</dependency>

2、默认端口为2000,用SecureCRT的工具就可以链接,并查看spring状态。

二、

1、该文章重点不是该功能的指导开发,而是提醒大家,该功能在springBoot 2.0.1.RELEASE版本已经废弃(自己用的版本)。

文件中查看,如截图说明该功能已经不在支持。

{
  "defaultValue": true,
  "deprecated": true,
  "name": "management.shell.ssh.enabled",
  "description": "Whether to enable CRaSH SSH support.",
  "type": "java.lang.Boolean",
  "deprecation": {
    "reason": "CRaSH support is no longer available.",
    "level": "error"
  }
}

2、所以提醒大家,如果自己在pom.xml里增加了该依赖,但是该功能更却不可用,就不要再浪费时间定位了,确认自己的版本是否还支持该功能。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章