透过迷雾看破本质 2016-10-01 02:53 采纳率: 60%
浏览 1054

strut+spring,怎么在action中获得spring ioc容器的bean呢?

我想在action方法中通过代码获得ioc 中的bean,就教

  • 写回答

2条回答 默认 最新

  • Veggiel 2016-10-01 03:47
    关注
     ApplicationContext ac = new FileSystemXmlApplicationContext("applicationContext.xml"); 
    ac.getBean("beanId"); 
    
    评论

报告相同问题?