Skip to content

Commit

Permalink
Remove workaround for data source cycle (#1445)
Browse files Browse the repository at this point in the history
It should be fixed at Spring Boot side, see spring-projects/spring-boot@2f83a67

Signed-off-by: Yanming Zhou <[email protected]>
  • Loading branch information
quaff authored Jan 22, 2025
1 parent d6a61fd commit c507a22
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
import org.springframework.aop.scope.ScopedProxyUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
Expand Down Expand Up @@ -53,11 +50,9 @@
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.weaving.LoadTimeWeaverAware;
import org.springframework.core.env.Environment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.style.ToStringCreator;
import org.springframework.instrument.classloading.LoadTimeWeaver;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

Expand Down Expand Up @@ -158,27 +153,6 @@ public String toString() {

}

@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(name = "javax.persistence.EntityManagerFactory")
protected static class JpaInvokerConfiguration implements LoadTimeWeaverAware, InitializingBean {

@Autowired
private ListableBeanFactory beanFactory;

@Override
public void afterPropertiesSet() {
String cls = "org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker";
if (this.beanFactory.containsBean(cls)) {
this.beanFactory.getBean(cls);
}
}

@Override
public void setLoadTimeWeaver(LoadTimeWeaver ltw) {
}

}

@Component
protected static class RefreshScopeBeanDefinitionEnhancer
implements BeanDefinitionRegistryPostProcessor, EnvironmentAware {
Expand Down

0 comments on commit c507a22

Please sign in to comment.