Spring 构造方法循环依赖能可以用 @Lazy 解决么?
@Component
public class Apple{
public Apple(@Lazy Banana banana) {
System.out.println("banana = " + banana.toString()+","+banana.getClass());
}
}
Spring 构造方法循环依赖能可以用 @Lazy 解决么?
@Component
public class Apple{
public Apple(@Lazy Banana banana) {
System.out.println("banana = " + banana.toString()+","+banana.getClass());
}
}