0
我正在使用spring/hibernate。我已经在applicationContext.xml文件中配置了5个数据源。所有数据源都是com.mchange.v2.c3p0.ComboPooledDataSource类型,但id不同。当我有应用程序上下文时,如何获得所有已配置的数据源。我得到的应用程序上下文如下:获取在applicationContext.xml文件中配置的所有数据源?
WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
谢谢!