2017-02-22 132 views

回答

1

首先,您需要启用安全为您管理的端点:

@Configuration 
public class SecurityConfig extends WebSecurityConfigurerAdapter { 

    @Override 
    public void configure(HttpSecurity http) throws Exception { 
     http 
      .antMatcher("/**") 
       .authorizeRequests() 
      .antMatchers("/hystrix.stream") 
       .authenticated(); // or whatever you like in here 
      // rest of your security config 
    } 

} 

management.security.enabled = true 

接下来,就像你对任何其他端点你可以配置访问hystrix.stream

相关问题