首页 > 代码库 > How to configure Spring Security to allow Swagger URL to be accessed without authentication

How to configure Spring Security to allow Swagger URL to be accessed without authentication

@Configurationpublic class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {    @Override    public void configure(WebSecurity web) throws Exception {        web.ignoring().antMatchers("/v2/api-docs", "/configuration/ui", "/swagger-resources", "/configuration/security", "/swagger-ui.html", "/webjars/**");    }}

 

 

 

http://stackoverflow.com/questions/37671125/how-to-configure-spring-security-to-allow-swagger-url-to-be-accessed-without-aut

How to configure Spring Security to allow Swagger URL to be accessed without authentication