SpringBoot整合Arthas
# 1.创建Springboot项目
pom依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.taobao.arthas</groupId>
<artifactId>arthas-spring-boot-starter</artifactId>
<version>3.3.6</version>
</dependency>
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 2.添加配置
server.port=8081
arthas.ip=127.0.0.1
arthas.agent-id=arthas_fire
arthas.tunnel-server=ws://127.0.0.1:7777/ws
1
2
3
4
2
3
4
# 3.启动项目
看到Arthas agent已启动,说明监控成功
# 4.进入Arthas
浏览器访问 http://localhost:8563/ (opens new window)
案例源码:https://gitee.com/firegitspace/arthas-demo.git (opens new window)
最后更新时间: 2024/03/15, 17:35:22