在Servlet中獲取spring管理的bean

在Servlet中獲取spring管理的bean須要導入spring的web相關的jar包。spring-web-3.2.0.RELEASE.jarjava 在web.xml文件添加ContextLoaderListener 在Servlet中調用如下代碼,獲取ApplicationContext對象進而獲取spring管理的bean。web ApplicationContext applicat
相關文章
相關標籤/搜索