java的main方法中调用spring的service

来源:互联网 发布:解屏幕锁软件 编辑:程序博客网 时间:2024/05/12 01:14
ApplicationContext ac = new ClassPathXmlApplicationContext("app-all.xml");
  IAppService ips = (IAppService) ac.getBean("appService");
  System.out.println(ips.getAllList());
0 0
原创粉丝点击