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裏增加了該依賴,但是該功能更卻不可用,就不要再浪費時間定位了,確認自己的版本是否還支持該功能。

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