Commit 822c7bf0 by chongli

添加了静态资源的springsecurity配置

parent 4b6eb8d7
......@@ -55,10 +55,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
http.authorizeRequests()
.antMatchers("/", "/*.html", "/favicon.ico", "/css/**", "/js/**", "/fonts/**", "/layui/**", "/img/**",
.antMatchers("/", "/*.html", "/*.png", "/*.css", "/*.js", "/fonts/**", "/layui/**", "/img/**",
"/v2/api-docs/**", "/swagger-resources/**", "/webjars/**", "/pages/**", "/druid/**",
"/statics/**")
"/static/**")
.permitAll().anyRequest().authenticated();
//http.authorizeRequests().anyRequest().permitAll();
http.formLogin().loginProcessingUrl("/login")
.successHandler(authenticationSuccessHandler).failureHandler(authenticationFailureHandler).and()
.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment