获取ApplicationContext
1、WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
2、WebApplicationContextUtils.getWebApplicationContext(servletContext)
3、RequestContextUtils.getWebApplicationContext(request)
Powered by: 博客园 Copyright © 2024 yjss Powered by .NET 9.0 on Kubernetes