Spring Boot Admin
管理服务器端
pom.xml
1 <dependency> 2 <groupId>de.codecentric</groupId> 3 <artifactId>spring-boot-admin-starter-server</artifactId> 4 <version>2.0.1</version> 5 </dependency> 6 <dependency> 7 <groupId>de.codecentric</groupId> 8 <artifactId>spring-boot-admin-server-ui</artifactId> 9 <version>2.0.1</version> 10 </dependency> 11 <dependency> 12 <groupId>org.springframework.boot</groupId> 13 <artifactId>spring-boot-starter-mail</artifactId> 14 </dependency>
application.properties
1 2 | server.port=1125 spring.application.name= admin2.0 |
DemoApplication
1 2 3 4 5 6 7 8 9 10 | @Configuration @EnableAutoConfiguration @EnableAdminServer //@EnableWebSecurity public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication. class , args); } } |
Admin Client端
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>1.5.6</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> |
application.properties
1 2 3 4 5 6 | server.port=1127 spring.application.name=qianjiajie spring.boot.admin.auto-registration = true spring.boot.admin.url = http: //localhost:1125 spring.boot.admin.api-path = urlllll management.security.enabled = false |
今日事今日毕
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步