wei.zhang2 2017-10-13 18:16:59 +08:00
parent b49d2e129f
commit 10732fed7e
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/css/**", "/fonts/**", "/img/**", "/js/**", "/layui/**", "/files/*", "/v2/api-docs/**",
.antMatchers("/css/**", "/fonts/**", "/img/**", "/js/**", "/layui/**", "/statics/**", "/v2/api-docs/**",
"/swagger-resources/**", "/swagger-ui.html", "/webjars/**")
.permitAll().anyRequest().authenticated().and().formLogin().loginProcessingUrl("/login")
.successHandler(authenticationSuccessHandler).failureHandler(authenticationFailureHandler).and()

View File

@ -59,7 +59,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/files/**")
registry.addResourceHandler("/statics/**")
.addResourceLocations(ResourceUtils.FILE_URL_PREFIX + filesPath + File.separator);
}