mybatis 获取Connection

// 获取没有关闭的连接
SqlSessionTemplate st = (SqlSessionTemplate) getSqlSession();

Connection connection = SqlSessionUtils
	.getSqlSession(st.getSqlSessionFactory(), st.getExecutorType(),st.getPersistenceExceptionTranslator())
	.getConnection();

//获取的连接是关闭的不可用的连接
this.getSqlSession.getConnection();


版权声明:本文为gmj53原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。