@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
MemDetailsService memDetailsService;
@Autowired
SimpleLoginSuccessHandler simpleLoginSuccessHandler;
@Override
//WebSecurity:For example, if you wish to ignore certain requests.
//用于配置类似防火墙,放行某些URL。
public void configure(WebSecurity web) throws Exception {
// 设置不拦截规则
//web.ignoring().antMatchers("/jsfavicon.ico", "/swagger*favicon.ico", "/image
private final List execludeUrls = new ArrayList() {{
add("/upload");
add("/upload/uploadActivateAttachment");
add("/buy02");
add("/buy02/uploadActivationSel");
}};
}