Spring获取SessionFactory


String sql = "select sysdate from dual";
		
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext(); 
String[] names = wac.getBeanDefinitionNames();
for(int i=0; i

最后要关闭连接

你可能感兴趣的:(Spring获取SessionFactory)