Spring常用工具类
1.获取ServletContext 和 WebApplicationContext
WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
ServletContext servletContext = webApplicationContext.getServletContext();
沉没的Atlantis
1.获取ServletContext 和 WebApplicationContext
WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
ServletContext servletContext = webApplicationContext.getServletContext();