springcloud admin 展示日志


1、application.yml中增加配置

management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS
logging:
  file: 日志存放路徑,如:/opt/log/xxx.log (和生產同步)
  

2、build.gradle增加jar引用

compile('org.springframework.boot:spring-boot-starter-actuator')
compile group: 'org.jolokia', name: 'jolokia-core', version: '1.6.0'
compile('de.codecentric:spring-boot-admin-starter-client:2.0.2')

3、logback.xml中增加代碼

<include resource="org/springframework/boot/logging/logback/base.xml"/><jmxConfigurator/>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM