摘要:
根据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 阅读全文