spring boot admin 搭建詳解
1. Spring Boot Admin 定義
Spring Boot Admin 是針對 Spring Boot 的actuator接口進行UI美化的接口,可以方便的瀏覽被監(jiān)控的Spring Boot項目的基本信息、詳細的Health信息、JVM信息、垃圾回收信息、各種配置信息(數(shù)據(jù)源、緩存、命中率等)
2 系統(tǒng)搭建
server 端搭建
1、gradle中引入一下依賴
compile('de.codecentric:spring-boot-admin-server:1.5.6')
compile('de.codecentric:spring-boot-admin-server-ui:1.5.6')
2、配置properties
server.port=8082
入口函數(shù)需要加入的注解
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
public class AdminServerApplication {
public static void main(String[] args){
SpringApplication.run(AdminServerApplication.class,args);
}
}
client搭建
1、gradle 需要引入的依賴
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('de.codecentric:spring-boot-admin-starter-client:1.5.6')
2、application.yml需要的配置
management: security: enabled: false spring: boot: admin: url: http://localhost:8082
main函數(shù)編寫
@SpringBootApplication
public class ShirSpringBootApplication {
public static void main(String[] args){
SpringApplication.run(ShirSpringBootApplication.class,args);
}
}
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
idea左側(cè)的commit框設(shè)置顯示出來方式
在IDEA中顯示左側(cè)的commit框,首先通過File-Settings-Version Control-Commit進行設(shè)置,然后勾選Use non-modal commit interface完成2025-01-01
SpringBoot + SpringSecurity 短信驗證碼登錄功能實現(xiàn)
這篇文章主要介紹了SpringBoot + SpringSecurity 短信驗證碼登錄功能實現(xiàn),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-06-06
Java?ASM使用logback日志級別動態(tài)切換方案展示
這篇文章主要介紹了Java?ASM使用logback日志級別動態(tài)切換方案展示,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步早日升職加薪2022-04-04
Spring?Boot?中的?Native?SQL基本概念及使用方法
在本文中,我們介紹了 Spring Boot 中的 Native SQL,以及如何使用 JdbcTemplate 和 NamedParameterJdbcTemplate 來執(zhí)行自定義的 SQL 查詢或更新語句,需要的朋友跟隨小編一起看看吧2023-07-07

