Hibernate 获取 JDBC connection
两种用法:
1,
Connection connection = ((SessionFactoryImplementor)sessionFactory).getConnectionProvider().getConnection();
2,
getSession().doWork(new Work() { @Override public void execute(Connection arg0) throws SQLException { } });
浙公网安备 33010602011771号