|
|
@@ -3,10 +3,8 @@ package jp.yamoto.farm.common.config;
|
|
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
|
|
-import jp.yamoto.farm.common.filter.PathTraversalFilter;
|
|
|
import jp.yamoto.farm.common.resolver.DecryptFieldArgumentResolver;
|
|
|
import jp.yamoto.farm.common.resolver.DecryptRequestBodyConverter;
|
|
|
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.http.converter.HttpMessageConverter;
|
|
|
@@ -66,12 +64,4 @@ public class WebConfig implements WebMvcConfigurer {
|
|
|
converters.add(decryptConverter);
|
|
|
}
|
|
|
|
|
|
- @Bean
|
|
|
- public FilterRegistrationBean<PathTraversalFilter> pathTraversalFilter() {
|
|
|
- FilterRegistrationBean<PathTraversalFilter> registration = new FilterRegistrationBean<>();
|
|
|
- registration.setFilter(new PathTraversalFilter());
|
|
|
- registration.addUrlPatterns("/*"); // すべてのURL
|
|
|
- registration.setOrder(1); // 高優先度
|
|
|
- return registration;
|
|
|
- }
|
|
|
}
|