码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2017-01-18 01:16:08      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:ext   ant   access   exce   throws   xtend   config   oid   rri   

@Configuration
public 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

标签:ext   ant   access   exce   throws   xtend   config   oid   rri   

原文地址:http://www.cnblogs.com/softidea/p/6295115.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!