Spring boot admin 使用
1. maven依赖
1 2 3 4 5 6 7 8 9 10 11 | <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> |
2. 应用配置文件
1 2 3 4 5 | server.port =8090 spring.application.name=SpringBootAdminWeb spring.boot.admin.url=http: //localhost:${server.port} spring.jackson.serialization.indent_output= true endpoints.health.sensitive= false |
3. spring boot admin server 注解启动
1 2 3 4 5 6 7 | @SpringBootApplication @EnableAdminServer publicclassPaasApplication{ publicstaticvoid main(String[] args){ SpringApplication.run(PaasApplication. class , args); } } |
4. 客户端引用
1 2 3 4 5 | <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>1.3.2</version> </dependency> |
5. 日志操作:
1 2 3 4 5 6 7 8 | <dependency> <groupId>org.jolokia</groupId> <artifactId>jolokia-core</artifactId> </dependency> <configuration> <include resource= "org/springframework/boot/logging/logback/base.xml" /> <jmxConfigurator/> </configuration> |
6. 参考文档:
1 | http: //codecentric.github.io/spring-boot-admin/1.5.0/#getting-started |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2014-05-06 oracle nodejs 访问
2014-05-06 oracle 变量作用域
2014-05-06 Oracle集合类型
2014-05-06 Oracle sql之条件语句 循环语句