解释下关于WebApplicationContextUtils

来源:百度知道 编辑:UC知道 时间:2024/06/13 11:19:31
下面这段话什么意思?
ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext());

Spring 包中的一个公用类,一般用来获取,web上下文的信息

ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext());

得到web应用的上下文信息,填入的参数,是由struts2,所提供的当前servlet上下文的信息。