JAVA-24938 Article Code Matches first commit (#14820)

This commit is contained in:
anuragkumawat
2023-10-21 14:27:49 +05:30
committed by GitHub
parent adb490c874
commit b0ed62e8c8
5 changed files with 38 additions and 4 deletions
@@ -0,0 +1,19 @@
package com.baeldung.ex.beancreationexception.cause9;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class Config {
@Autowired
BeanFactory beanFactory;
@Bean
public BeanB beanB() {
beanFactory.getBean("beanA");
return new BeanB();
}
}