zoukankan      html  css  js  c++  java
  • Spring boot admin 使用

    1. maven依赖
     
    <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. 应用配置文件
    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 注解启动
    @SpringBootApplication
    @EnableAdminServer
    publicclassPaasApplication{
    publicstaticvoid main(String[] args){
    SpringApplication.run(PaasApplication.class, args);
    }
    }
     
    4. 客户端引用
    <dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-client</artifactId>
    <version>1.3.2</version>
    </dependency>
     
    5. 日志操作:
    <dependency>
    <groupId>org.jolokia</groupId>
    <artifactId>jolokia-core</artifactId>
    </dependency>
    <configuration>
    <include resource="org/springframework/boot/logging/logback/base.xml"/>
    <jmxConfigurator/>
    </configuration>
    

     

    6. 参考文档:
     
    http://codecentric.github.io/spring-boot-admin/1.5.0/#getting-started
  • 相关阅读:
    Git
    linux下利用virtualenv搭建虚拟环境
    Session和Cookie
    Redis
    从零开始学Go之基本(二):包、函数声明与格式化输出
    从零开始学Go之HelloWorld
    C++ vector容器使用
    FIRST集和FOLLOW集的计算
    go编译错误:runnerw.exe:CreateProcess failed with error 216:
    Linux下vi编辑器常用命令
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/6817654.html
Copyright © 2011-2022 走看看