1. 程式人生 > >spring-boot 效能監控

spring-boot 效能監控

spring: 
  application: 
    name: myfee
  jackson: 
    serialization: 
      indent-output: true
    date-format: yyyy-MM-dd HH:mm:ss     
    time-zone: GMT+08

security:
  basic:
    enabled: true
    path: /xxx/admin
  user: 
    name: xxx
    password: xxx
    
management: 
  security: 
    role: SUPERUSER
    enabled: true
  port: 8888
  context-path: /xxx/admin

endpoints: 
  health: 
    sensitive: true   
    enabled: true
  metrics:  
    sensitive: true   
    enabled: true

其中設定了使用者名稱,密碼,對於admin這個路徑才進行攔截。