forked from opensolon/solon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/noear/solon into dev
- Loading branch information
Showing
9 changed files
with
137 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Solon Admin Client | ||
|
||
```xml | ||
|
||
<dependency> | ||
<groupId>org.noear</groupId> | ||
<artifactId>solon-admin-client</artifactId> | ||
</dependency> | ||
``` | ||
|
||
## 1. 描述 | ||
|
||
**需配合 Solon Admin Server 一起使用** | ||
|
||
Solon Admin 是一款基于 Solon 的轻量级应用监视器,可用于监视 Solon 应用的运行状态。 | ||
|
||
## 2. 使用 | ||
|
||
引入包后,启动类添加注解:`@EnableAdminServer` | ||
|
||
```java | ||
|
||
@EnableAdminClient | ||
@SolonMain | ||
public class Main { | ||
|
||
public static void main(String[] args) { | ||
Solon.start(Main.class, args); | ||
} | ||
} | ||
``` | ||
|
||
之后启动应用程序,访问 Solon Admin Server 实例的地址即可使用。 | ||
|
||
## 3. 配置 | ||
|
||
```yaml | ||
solon.admin.client: | ||
enabled: true #是否启用 Solon Admin Client | ||
mode: "local" #模式:local 本地模式,cloud 云模式 | ||
serverUrl: "http://localhost:8080" #Solon Admin Server 实例地址 | ||
connectTimeout: 5000 #连接超时,单位:毫秒 | ||
readTimeout: 5000 #读取超时,单位:毫秒 | ||
metadata: "" #自定义元数据 | ||
showSecretInformation: false #是否向服务端发送敏感信息,如环境变量等 | ||
|
||
## 设置 Solon Health Detector 监视器,* 为启用全部监视器 | ||
solon.health.detector: "*" | ||
``` | ||
## 4. 配置中心 | ||
Solon Admin Client 支持连接到配置中心,只需将 `mode` 设置为 `cloud`,并在 Solon 中配置配置中心相关信息即可启用。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Solon Admin Server | ||
|
||
```xml | ||
<dependency> | ||
<groupId>org.noear</groupId> | ||
<artifactId>solon-admin-server</artifactId> | ||
</dependency> | ||
``` | ||
|
||
## 1. 描述 | ||
|
||
**需配合 Solon Admin Client 一起使用** | ||
|
||
Solon Admin 是一款基于 Solon 的轻量级应用监视器,可用于监视 Solon 应用的运行状态。 | ||
|
||
## 2. 使用 | ||
|
||
引入包后,启动类添加注解:`@EnableAdminServer` | ||
|
||
```java | ||
@EnableAdminServer | ||
@SolonMain | ||
public class Main { | ||
|
||
public static void main(String[] args) { | ||
Solon.start(Main.class, args); | ||
} | ||
} | ||
``` | ||
|
||
之后启动应用程序,访问 `http://localhost:8080`(默认地址)即可查看相关信息。 | ||
|
||
## 3. 配置 | ||
|
||
```yaml | ||
solon.admin.server: | ||
enabled: true #是否启用 Solon Admin Server | ||
mode: "local" #模式:local 本地模式,cloud 云模式 | ||
heartbeatInterval: 10000 #心跳速率,单位:毫秒 | ||
clientMonitorPeriod: 2000 #客户端监控周期,单位:毫秒 | ||
connectTimeout: 5000 #连接超时,单位:毫秒 | ||
readTimeout: 5000 #读取超时,单位:毫秒 | ||
``` | ||
## 4. 配置中心 | ||
Solon Admin Server 支持连接到配置中心,只需将 `mode` 设置为 `cloud`,并在 Solon 中配置配置中心相关信息即可启用。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters