master
parent
b49d2e129f
commit
10732fed7e
|
|
@ -21,7 +21,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http.authorizeRequests()
|
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/**")
|
"/swagger-resources/**", "/swagger-ui.html", "/webjars/**")
|
||||||
.permitAll().anyRequest().authenticated().and().formLogin().loginProcessingUrl("/login")
|
.permitAll().anyRequest().authenticated().and().formLogin().loginProcessingUrl("/login")
|
||||||
.successHandler(authenticationSuccessHandler).failureHandler(authenticationFailureHandler).and()
|
.successHandler(authenticationSuccessHandler).failureHandler(authenticationFailureHandler).and()
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||||
registry.addResourceHandler("/files/**")
|
registry.addResourceHandler("/statics/**")
|
||||||
.addResourceLocations(ResourceUtils.FILE_URL_PREFIX + filesPath + File.separator);
|
.addResourceLocations(ResourceUtils.FILE_URL_PREFIX + filesPath + File.separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue