Skip to content

Commit 1e15993

Browse files
quaffryanjbaxter
authored andcommitted
Remove workaround for data source cycle (#1445)
It should be fixed at Spring Boot side, see spring-projects/spring-boot@2f83a67 Signed-off-by: Yanming Zhou <[email protected]>
1 parent ae6c7db commit 1e15993

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
import org.springframework.aop.scope.ScopedProxyUtils;
2424
import org.springframework.beans.BeansException;
2525
import org.springframework.beans.factory.BeanFactory;
26-
import org.springframework.beans.factory.InitializingBean;
27-
import org.springframework.beans.factory.ListableBeanFactory;
28-
import org.springframework.beans.factory.annotation.Autowired;
2926
import org.springframework.beans.factory.config.BeanDefinition;
3027
import org.springframework.beans.factory.config.BeanDefinitionHolder;
3128
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -53,11 +50,9 @@
5350
import org.springframework.context.EnvironmentAware;
5451
import org.springframework.context.annotation.Bean;
5552
import org.springframework.context.annotation.Configuration;
56-
import org.springframework.context.weaving.LoadTimeWeaverAware;
5753
import org.springframework.core.env.Environment;
5854
import org.springframework.core.env.StandardEnvironment;
5955
import org.springframework.core.style.ToStringCreator;
60-
import org.springframework.instrument.classloading.LoadTimeWeaver;
6156
import org.springframework.stereotype.Component;
6257
import org.springframework.util.StringUtils;
6358

@@ -158,27 +153,6 @@ public String toString() {
158153

159154
}
160155

161-
@Configuration(proxyBeanMethods = false)
162-
@ConditionalOnClass(name = "javax.persistence.EntityManagerFactory")
163-
protected static class JpaInvokerConfiguration implements LoadTimeWeaverAware, InitializingBean {
164-
165-
@Autowired
166-
private ListableBeanFactory beanFactory;
167-
168-
@Override
169-
public void afterPropertiesSet() {
170-
String cls = "org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker";
171-
if (this.beanFactory.containsBean(cls)) {
172-
this.beanFactory.getBean(cls);
173-
}
174-
}
175-
176-
@Override
177-
public void setLoadTimeWeaver(LoadTimeWeaver ltw) {
178-
}
179-
180-
}
181-
182156
@Component
183157
protected static class RefreshScopeBeanDefinitionEnhancer
184158
implements BeanDefinitionRegistryPostProcessor, EnvironmentAware {

0 commit comments

Comments
 (0)