-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathspringboot-ssh.java
More file actions
41 lines (33 loc) · 908 Bytes
/
springboot-ssh.java
File metadata and controls
41 lines (33 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---------------------------
Spring-boot 可以让SSH管理 |
---------------------------
# 仅仅需要在依赖中添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-remote-shell</artifactId>
</dependency>
# 启动的时候,系统会提供SSH的访问密码
---------------------------
Spring-boot 常用命令 |
---------------------------
help
metrics
endpoint
endpoint invoke health
---------------------------
Spring-boot 定制登录用户 |
---------------------------
# 在 application.properties 中配置
shell.auth.simple.user=kevin
shell.auth.simple.password=wyf
---------------------------
Spring-boot 扩展命令 |
---------------------------
# 可以在spring-boot-starter-remote-shell.jar 中看到 Spring boot 为我们定制的命令
commands.crash
autoconfig.groovy
beans.groovy
endpoint.groovy
login.groovy
metrics.groovy
# 使用Groovy脚本来进行