Horje
spring boot swagger ui 401 Code Example
spring boot swagger ui 401
// Fixed by lowering the swagger version to 2.7.0

@EnableWebSecurity
@Configuration
public class ResourceServerConfig extends WebSecurityConfigurerAdapter {
//...//
    public static final String[] AUTH_WHITELIST = {
        "/swagger-ui.html/**", "/configuration/**", "/swagger-resources/**", "/v2/api-docs", "/webjars/**"
    };
//...//

    @Override
    public void configure(WebSecurity web) throws Exception {
        web.ignoring().mvcMatchers(HttpMethod.OPTIONS, "/**");
        web.ignoring().antMatchers(AUTH_WHITELIST);
    }
  
}




Java

Related
get spring application context Code Example get spring application context Code Example
ReverseString Code Example ReverseString Code Example
string vs new string Code Example string vs new string Code Example
how to make a button disapear on click in javafx Code Example how to make a button disapear on click in javafx Code Example
how to set image dynamically in android Code Example how to set image dynamically in android Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8