摘要: 前面已经配置成功后,就可以在Web 层的Servlet或Jsp中调用访问Spring了,如果你 编制的是一个Servlet/Jsp 程序,那么在你的Servlet/Jsp 使用下面的代码通过Spring 创建B 的实例:ServletContext servletContext =this.getServletContext();WebApplicationContext appContext = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);B b = (B) appContext.ge 阅读全文
posted @ 2014-02-21 11:17 欢歌911 阅读(149) 评论(0) 推荐(0) 编辑