This commit is contained in:
zhou-hao
2017-12-18 17:56:53 +08:00
parent 0ab96ec13c
commit 45a87c5deb

View File

@@ -28,7 +28,7 @@ import java.util.concurrent.CountDownLatch;
* @since 2.0
*/
public class ResultMapsUtils {
private static SqlSession sqlSession;
private volatile static SqlSession sqlSession;
private static CountDownLatch countDownLatch = new CountDownLatch(1);
@@ -37,6 +37,7 @@ public class ResultMapsUtils {
try {
countDownLatch.await();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new UnsupportedOperationException(e);
}
if (sqlSession == null) {