mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-18 22:59:20 +00:00
update doc
This commit is contained in:
1 parent
1e119b02aa
commit
178e7b9e01
123 files changed
+1130
-233
No files matched your search
@@ -37,6 +37,7 @@ Contents
|
||||
* [命令列表](commands.md)
|
||||
* [WebConsole](web-console.md)
|
||||
* [Docker](docker.md)
|
||||
* [Arthas Spring Boot Starter](spring-boot-starter.md)
|
||||
* [用户案例](https://github.com/alibaba/arthas/issues?q=label%3Auser-case)
|
||||
* [常见问题](https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered)
|
||||
* [Fork me at GitHub](https://github.com/alibaba/arthas)
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
Arthas Spring Boot Starter
|
||||
=====
|
||||
|
||||
> 只支持 spring boot 2
|
||||
|
||||
最新版本:[查看](https://search.maven.org/search?q=arthas-spring-boot-starter)
|
||||
|
||||
配置maven依赖:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.taobao.arthas</groupId>
|
||||
<artifactId>arthas-spring-boot-starter</artifactId>
|
||||
<version>${arthas.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
应用启动后,spring会启动arthas,并且attach自身进程。
|
||||
|
||||
|
||||
### 配置属性
|
||||
|
||||
比如,通过配置tunnel server实现远程管理:
|
||||
|
||||
```
|
||||
arthas.agentId=hsehdfsfghhwertyfad
|
||||
arthas.tunnel-server=ws://47.75.156.201:7777/ws
|
||||
```
|
||||
|
||||
全部支持的配置项:[参考](https://github.com/alibaba/arthas/blob/master/arthas-spring-boot-starter/src/main/java/com/alibaba/arthas/spring/ArthasProperties.java)
|
||||
|
||||
|
||||
### 查看Endpoint信息
|
||||
|
||||
假定endpoint端口是 8080,则通过下面url可以查看:
|
||||
|
||||
http://localhost:8080/actuator/arthas
|
||||
|
||||
```
|
||||
{
|
||||
"arthasConfigMap": {
|
||||
"agentId": "hsehdfsfghhwertyfad",
|
||||
"tunnel-server": "ws://47.75.156.201:7777/ws",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 非spring boot应用使用方式
|
||||
|
||||
非Spring Boot应用,可以通过下面的方式来使用:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.taobao.arthas</groupId>
|
||||
<artifactId>arthas-agent-attach</artifactId>
|
||||
<version>${arthas.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
```java
|
||||
import com.taobao.arthas.agent.attach.ArthasAgent;
|
||||
|
||||
public class ArthasAttachExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ArthasAgent.attach();
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user