|
33 | 33 | import org.slf4j.LoggerFactory; |
34 | 34 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
35 | 35 | import org.springframework.beans.factory.annotation.Value; |
36 | | -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; |
37 | | -import org.springframework.beans.factory.support.BeanDefinitionRegistry; |
38 | | -import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; |
39 | 36 | import org.springframework.context.annotation.Bean; |
40 | 37 | import org.springframework.context.annotation.Configuration; |
41 | 38 | import org.springframework.http.converter.HttpMessageConverter; |
42 | 39 | import org.springframework.http.converter.ResourceHttpMessageConverter; |
43 | 40 | import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; |
44 | 41 | import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
45 | | -import org.springframework.util.ClassUtils; |
46 | 42 | import org.springframework.web.cors.CorsConfiguration; |
47 | 43 | import org.springframework.web.cors.CorsConfigurationSource; |
48 | 44 | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
|
62 | 58 | */ |
63 | 59 | @Configuration |
64 | 60 | public class BaSyxHTTPConfiguration { |
65 | | - private static final String SPRINGDOC_QUERYDSL_CUSTOMIZER_BEAN_NAME = "queryDslQuerydslPredicateOperationCustomizer"; |
66 | | - |
67 | 61 | Logger logger = LoggerFactory.getLogger(BaSyxHTTPConfiguration.class); |
68 | 62 |
|
69 | 63 | /** |
@@ -117,26 +111,6 @@ private static void moveResourceHttpMessageConverterToFront(List<HttpMessageConv |
117 | 111 | } |
118 | 112 | } |
119 | 113 |
|
120 | | - @Bean |
121 | | - public static BeanDefinitionRegistryPostProcessor springdocQuerydslCompatibilityPostProcessor() { |
122 | | - return new BeanDefinitionRegistryPostProcessor() { |
123 | | - @Override |
124 | | - public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { |
125 | | - if (isLegacySpringDataTypeInformationMissing() && registry.containsBeanDefinition(SPRINGDOC_QUERYDSL_CUSTOMIZER_BEAN_NAME)) { |
126 | | - registry.removeBeanDefinition(SPRINGDOC_QUERYDSL_CUSTOMIZER_BEAN_NAME); |
127 | | - } |
128 | | - } |
129 | | - |
130 | | - @Override |
131 | | - public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { |
132 | | - } |
133 | | - }; |
134 | | - } |
135 | | - |
136 | | - private static boolean isLegacySpringDataTypeInformationMissing() { |
137 | | - return !ClassUtils.isPresent("org.springframework.data.util.TypeInformation", BaSyxHTTPConfiguration.class.getClassLoader()); |
138 | | - } |
139 | | - |
140 | 114 | /** |
141 | 115 | * Collects a list of {@link CorsPathPatternProvider} and uses them to configure |
142 | 116 | * CORS for the passed pathPatterns |
|
0 commit comments