|
|
|
|
@ -2,6 +2,8 @@ package com.aurora.config;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.aurora.handler.PageableHandlerInterceptor;
|
|
|
|
|
import com.aurora.handler.WebSecurityHandler;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
|
@ -14,6 +16,10 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
@Configuration
|
|
|
|
|
public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public WebSecurityHandler getWebSecurityHandler() {
|
|
|
|
|
return new WebSecurityHandler();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void addCorsMappings(CorsRegistry registry) {
|
|
|
|
|
@ -27,9 +33,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
|
|
@Override
|
|
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
|
registry.addInterceptor(new PageableHandlerInterceptor());
|
|
|
|
|
registry.addInterceptor(getWebSecurityHandler());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|