spring boot swagger ui 401

Solutions on MaxInterview for spring boot swagger ui 401 by the best coders in the world

showing results for - "spring boot swagger ui 401"
Elena
21 Sep 2018
1// Fixed by lowering the swagger version to 2.7.0
2
3@EnableWebSecurity
4@Configuration
5public class ResourceServerConfig extends WebSecurityConfigurerAdapter {
6//...//
7    public static final String[] AUTH_WHITELIST = {
8        "/swagger-ui.html/**", "/configuration/**", "/swagger-resources/**", "/v2/api-docs", "/webjars/**"
9    };
10//...//
11
12    @Override
13    public void configure(WebSecurity web) throws Exception {
14        web.ignoring().mvcMatchers(HttpMethod.OPTIONS, "/**");
15        web.ignoring().antMatchers(AUTH_WHITELIST);
16    }
17  
18}