方法: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace PaiXie.Pos.Admin { /// <summary> /// 缓存页面 /// </summary> public class CacheFilterAttribute : ActionFilterAttribute { /// &…
java代码: public class InitListener implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { // 获取容器与相关的Service对象 ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());…