|
15 | 15 | */ |
16 | 16 | package org.springframework.data.repository.config; |
17 | 17 |
|
18 | | -import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.*; |
| 18 | +import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.GENERATED_BEAN_NAME_SEPARATOR; |
| 19 | +import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.generateBeanName; |
19 | 20 |
|
20 | 21 | import java.lang.annotation.Annotation; |
21 | 22 | import java.util.Collection; |
|
27 | 28 |
|
28 | 29 | import org.apache.commons.logging.Log; |
29 | 30 | import org.apache.commons.logging.LogFactory; |
30 | | -import org.springframework.beans.factory.FactoryBean; |
31 | 31 | import org.springframework.beans.factory.config.BeanDefinition; |
32 | 32 | import org.springframework.beans.factory.support.AbstractBeanDefinition; |
33 | 33 | import org.springframework.beans.factory.support.BeanDefinitionBuilder; |
34 | 34 | import org.springframework.beans.factory.support.BeanDefinitionRegistry; |
35 | | -import org.springframework.beans.factory.support.RootBeanDefinition; |
36 | 35 | import org.springframework.core.annotation.AnnotationUtils; |
37 | 36 | import org.springframework.core.io.ResourceLoader; |
38 | 37 | import org.springframework.core.log.LogMessage; |
39 | 38 | import org.springframework.dao.InvalidDataAccessApiUsageException; |
40 | 39 | import org.springframework.data.repository.core.RepositoryMetadata; |
41 | | -import org.springframework.data.repository.core.RepositoryMethodContext; |
42 | 40 | import org.springframework.data.repository.core.support.AbstractRepositoryMetadata; |
43 | | -import org.springframework.data.repository.core.support.DefaultRepositoryMethodContext; |
44 | 41 | import org.springframework.lang.Nullable; |
45 | 42 | import org.springframework.util.Assert; |
46 | 43 | import org.springframework.util.StringUtils; |
@@ -113,34 +110,7 @@ public String getDefaultNamedQueryLocation() { |
113 | 110 |
|
114 | 111 | @Override |
115 | 112 | public void registerBeansForRoot(BeanDefinitionRegistry registry, |
116 | | - RepositoryConfigurationSource configurationSource) { |
117 | | - |
118 | | - // A proxy RepositoryMethodContext for dependency injection |
119 | | -// registerIfNotAlreadyRegistered( |
120 | | -// () -> new RootBeanDefinition(RepositoryMethodContext.class, DefaultRepositoryMethodContext::getInjectionProxy), |
121 | | -// registry, "repositoryMethodContextFactory", configurationSource); |
122 | | - |
123 | | - registerIfNotAlreadyRegistered( |
124 | | - () -> new RootBeanDefinition(RepositoryMethodContextFactoryBean.class), |
125 | | - registry, "repositoryMethodContextFactory", configurationSource); |
126 | | - } |
127 | | - |
128 | | - static class RepositoryMethodContextFactoryBean implements FactoryBean<RepositoryMethodContext> { |
129 | | - |
130 | | - @Nullable |
131 | | - @Override |
132 | | - public RepositoryMethodContext getObject() throws Exception { |
133 | | - return DefaultRepositoryMethodContext.getInjectionProxy(); |
134 | | - } |
135 | | - |
136 | | - @Nullable |
137 | | - @Override |
138 | | - public Class<?> getObjectType() { |
139 | | - return RepositoryMethodContext.class; |
140 | | - } |
141 | | - |
142 | | - |
143 | | - } |
| 113 | + RepositoryConfigurationSource configurationSource) {} |
144 | 114 |
|
145 | 115 | /** |
146 | 116 | * Returns the prefix of the module to be used to create the default location for Spring Data named queries. |
|
0 commit comments