2017-02-22 82 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

相關問題