Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
2 years ago | |
---|---|---|
.. | ||
src | 2 years ago | |
README.md | 2 years ago | |
pom.xml | 2 years ago |
本 demo 主要演示了如何搭建一个 Spring Boot Admin 的服务端项目,可视化展示自己客户端项目的运行状态。
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
@EnableAdminServer
@SpringBootApplication
public class AdminServerApplication {
public static void main(String[] args) {
SpringApplication.run(AdminServerApplication.class, args);
}
}
server:
port: 8000
spring:
application:
name: spring-boot-demo-admin-server
boot:
admin:
instance-auth:
enabled: true
default-user-name: xkcoding
default-password: 123456
ui:
external-views:
- label: "xkcoding 🚀"
url: https://xkcoding.com
order: 2000
AdminServerApplication
,然后打开 http://localhost:8000
AdminClientApplication
,等待启动成功之后,观察是否成功注册上服务端一个用来深度学习并实战 spring boot 的项目,目前总共包含 66 个集成demo,已经完成 55 个。
Java SVG CSS JavaScript SQL other