没有合适的资源?快使用搜索试试~ 我知道了~
首页Spring Boot Admin 参考指南-2.1.1-SNAPSHOT 谷歌翻译.pdf
Spring Boot Admin 参考指南-2.1.1-SNAPSHOT 谷歌翻译.pdf
需积分: 5 806 浏览量
更新于2023-05-30
评论
收藏 721KB PDF 举报
Spring Boot Admin 参考指南-2.1.1-SNAPSHOT 谷歌翻译
资源详情
资源评论
资源推荐

2018/11/12 Spring Boot Admin Reference Guide
http://codecentric.github.io/spring-boot-admin/current/ 1/31
Spring Boot管理员参考指南
Johannes Edmeier
@joshiste (https://twitter.com/joshiste)
版本2.1.1-SNAPSHOT, 11.11.2018
已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼已翻译为以下语言: 中文(简体) 显示原文 选项 ▼

2018/11/12 Spring Boot Admin Reference Guide
http://codecentric.github.io/spring-boot-admin/current/ 2/31
目录
1.什么是Spring Boot Admin?
2.入门
2.1。设置Spring Boot Admin Server
2.2。注册客户端应用程序
2.2.1。Spring Boot管理客户端
2.2.2。Spring Cloud Discovery
3.客户申请
3.1。在应用程序列表中显示版本
3.2。JMX-bean管理
3.3。日志文件查看器
3.4。每个实例显示标签
3.5。Spring Boot管理客户端
4. Spring Boot管理服务器
4.1。Spring Cloud Discovery
4.1.1。SimpleDiscoveryClient配置
4.1.2。其他DiscoveryClients
4.1.3。转换ServiceInstances
4.1.4。CloudFoundry
4.2。聚类
4.3。通知
4.3.1。提醒通知
4.3.2。过滤通知
4.3.3。邮件通知
4.3.4。PagerDuty通知
4.3.5。OpsGenie通知
4.3.6。Hipchat通知
4.3.7。松弛通知
4.3.8。我们聊天通知
4.3.9。Microsoft Teams通知
4.3.10。电报通知
5.安全
5.1。保护Spring Boot Admin Server
5.2。保护客户端执行器端点
5.2.1。关于执行器端点的CSRF
6.定制
6.1。自定义通知程序
6.2。注入自定义HTTP标头
6.3。拦截请求和响应
6.4。自定义视图
6.4.1。添加顶级视图
6.4.2。可视化自定义端点
6.5。自定义标题徽标和标题
7.监控Spring Boot 1.5.x
8. 2.x的变化
8.1。UI
8.2。后端
8.3。客户
9.常见问题

2018/11/12 Spring Boot Admin Reference Guide
http://codecentric.github.io/spring-boot-admin/current/ 3/31
1.什么是Spring Boot Admin?
codecentric的春季启动Admin是一个社区项目,管理和监控您的春季启动 (http://projects.spring.io/spring-boot/) 应用。应用程序向我们
的Spring Boot Admin Client注册(通过HTTP)或使用 (例如Eureka,Consul)发现。UI只是Spring Boot Actuator端点
上的AngularJs应用程序。
®
SpringCloud®

2018/11/12 Spring Boot Admin Reference Guide
http://codecentric.github.io/spring-boot-admin/current/ 4/31
2.入门
2.1。设置Spring Boot Admin Server
首先,您需要设置您的服务器。要做到这一点,只需设置一个简单的启动项目(使用start.spring.io)。由于Spring Boot Admin
Server能够作为servlet或webflux应用程序运行,因此您需要决定并添加相应的Spring Boot Starter。在这个例子中,我们使用servlet
web starter。
1. 将Spring Boot Admin Server启动器添加到您的依赖项:
的
pom.xml
2. 通过添加配置来 @EnableAdminServer 引入Spring Boot Admin Server 配置:
如果要通过servlet-container中的war-deployment设置Spring Boot Admin Server,请查看
spring-boot-admin-
sample-war
(https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-war/)
。
另请参阅spring-boot-admin-sample-servlet
(https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-servlet/)项目,该项目还
增加了安全性。
2.2。注册客户端应用程序
要在SBA服务器上注册您的应用程序,您可以包含SBA客户端或使用Spring Cloud Discovery
(http://projects.spring.io/spring-cloud/spring-cloud.html)(例如Eureka,Consul,...)。在SBA服务器端使用静态配置还有一个简单的选
项。
2.2.1。Spring Boot管理客户端
Each application that wants to register has to include the Spring Boot Admin Client. In order to secure the endpoints also add
the spring-boot-starter-security .
1. Add spring-boot-admin-starter-client to your dependencies:
pom.xml
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
XML
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
public class SpringBootAdminApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootAdminApplication.class, args);
}
}
JAVA

2018/11/12 Spring Boot Admin Reference Guide
http://codecentric.github.io/spring-boot-admin/current/ 5/31
2. Enable the SBA Client by configuring the URL of the Spring Boot Admin Server:
application.properties
1
The URL of the Spring Boot Admin Server to register at.
2
As with Spring Boot 2 most of the endpoints aren’t exposed via http by default, we expose all of them. For
production you should carefully choose which endpoints to expose.
3. Make the actuator endpoints accessible:
1
For the sake of brevity we’re disabling the security for now. Have a look at the security section on how to deal
with secured endpoints.
2.2.2. Spring Cloud Discovery
If you already use Spring Cloud Discovery for your applications you don’t need the SBA Client. Just add a DiscoveryClient to
Spring Boot Admin Server, the rest is done by our AutoConfiguration.
The following steps uses Eureka, but other Spring Cloud Discovery implementations are supported as well. There are
examples using Consul
(https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-consul/) and Zookeeper
(https://github.com/codecentric/spring-boot-admin/tree/master/spring-boot-admin-samples/spring-boot-admin-sample-zookeeper/).
Also have a look at the Spring Cloud documentation (http://projects.spring.io/spring-cloud/spring-cloud.html).
1. Add spring-cloud-starter-eureka to you dependencies:
pom.xml
2. Enable discovery by adding @EnableDiscoveryClient to your configuration:
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
XML
spring.boot.admin.client.url=http://localhost:8080
management.endpoints.web.exposure.include=*
1
2
@Configuration
public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().permitAll()
.and().csrf().disable();
}
}
JAVA
1
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
XML
剩余30页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0