springsecurity怎么放掉swaager2和knife4j的静态资源

springsecurity中的config设置放行以下资源即可

		web.ignoring().antMatchers("/swagger/**")
				.antMatchers("/swagger-ui.html")
				.antMatchers("/webjars/**")
				.antMatchers("/v2/**")
        .antMatchers("/v2/api-docs-ext/**")
				.antMatchers("/swagger-resources/**")
        .antMatchers("/doc.html");

猜你喜欢

转载自blog.csdn.net/nyasm/article/details/115581529