master
parent
b49d2e129f
commit
10732fed7e
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue