摘要: 根据bean的id 读取spring 文件中的bean·servlet中private static ApplicationContext ctx = null; @Override public void init(ServletConfig config) throws ServletException { if(ctx == null){ ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(config.getServletContext()); } }·普通java类中 private 阅读全文
posted @ 2012-10-20 15:20 冀子@ 阅读(1049) 评论(0) 推荐(0) 编辑