spring在tomcat启动后获取bean
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
wac.getBean(beanName);
参考链接:
spring在tomcat启动后获取bean
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
wac.getBean(beanName);
参考链接: