首页 > ContextLoader和WebApplicationContextUtils获取WebApplicationContext?

ContextLoader和WebApplicationContextUtils获取WebApplicationContext?

ContextLoader.getCurrentWebApplicationContext()和WebApplicationContextUtils.getWebApplicationContext(ServletContext servletContext)区别是什么?两个方法都能得到WebApplicationContext,请问有什么区别?为什么WebApplicationContextUtils.getWebApplicationContext需要ServletContext作为参数,而它却更多被使用?

【热门文章】
【热门文章】