添加SpringBoot Admin监控中心支持

This commit is contained in:
macro
2019-10-17 17:26:37 +08:00
parent 47eaa3a5af
commit 02a2509530
14 changed files with 219 additions and 3 deletions

View File

@@ -34,6 +34,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/").authenticated()//该路径需要登录认证
// .antMatchers("/brand/list").hasAuthority("TEST")//该路径需要TEST权限
.antMatchers("/**").permitAll()
.antMatchers("/actuator/**")// 允许SpringBoot Admin 访问监控信息
.permitAll()
.and()//启用基于http的认证
.httpBasic()
.realmName("/")

View File

@@ -32,3 +32,11 @@ eureka:
fetch-registry: true
service-url:
defaultZone: http://localhost:8001/eureka/
management: #开启SpringBoot Admin的监控
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: always