spring测试

This commit is contained in:
troy.chen
2024-02-19 14:26:35 +08:00
parent 634ce431e3
commit f3b3c4543b
2 changed files with 0 additions and 2 deletions

View File

@@ -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);