下面列出了怎么用org.springframework.context.annotation.componentscan.cycle.left.LeftConfig的API类实例代码及写法,或者点击链接到github查看源代码。
public void evenCircularScansAreSupported() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(LeftConfig.class); // left scans right, and right scans left
ctx.refresh();
ctx.getBean("leftConfig"); // but this is handled gracefully
ctx.getBean("rightConfig"); // and beans from both packages are available
}
public void evenCircularScansAreSupported() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(LeftConfig.class); // left scans right, and right scans left
ctx.refresh();
ctx.getBean("leftConfig"); // but this is handled gracefully
ctx.getBean("rightConfig"); // and beans from both packages are available
}
public void evenCircularScansAreSupported() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(LeftConfig.class); // left scans right, and right scans left
ctx.refresh();
ctx.getBean("leftConfig"); // but this is handled gracefully
ctx.getBean("rightConfig"); // and beans from both packages are available
}