mirror of
https://github.com/wxd-gaming/test-all.git
synced 2026-07-01 23:54:34 +08:00
spring测试
This commit is contained in:
@@ -16,7 +16,6 @@ public class ScriptMain {
|
||||
//子容器
|
||||
childContainer = new AnnotationConfigApplicationContext("scripts");
|
||||
childContainer.setParent(context);
|
||||
childContainer.setApplicationStartup(context.getApplicationStartup());
|
||||
//从子容器中获取父容器中的Bean
|
||||
HelloController parentService = childContainer.getBean(HelloController.class);
|
||||
LoggerFactory.getLogger(Main.class).info("{}", parentService);
|
||||
|
||||
Reference in New Issue
Block a user