[转][Java]ApplicationContext 的继承体系

 

 

public static void main(String[] args) {
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
    UserService userService = (UserService) applicationContext.getBean("userService");
    System.out.println(userService);
}

 

 

posted on 2024-02-06 15:55  z5337  阅读(2)  评论(0编辑  收藏  举报