Joburgess 5 năm trước cách đây
mục cha
commit
6db879f90f

+ 10 - 10
edu-common/src/main/java/com/keao/edu/common/service/impl/BaseServiceImpl.java

@@ -35,7 +35,7 @@ public abstract class BaseServiceImpl<PK extends Serializable, T> implements Bas
 	public abstract BaseDAO<PK, T> getDAO();
 
 	@Autowired
-	private SqlSessionFactory sqlSessionFactory;
+	protected SqlSessionFactory sqlSessionFactory;
 
 	/**
 	 * 通过主键id加载对象
@@ -153,9 +153,9 @@ public abstract class BaseServiceImpl<PK extends Serializable, T> implements Bas
 			if(ps!=null){
 				ps.close();
 			}
-			if(connection!=null){
-				connection.close();
-			}
+//			if(connection!=null){
+//				connection.close();
+//			}
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
@@ -214,9 +214,9 @@ public abstract class BaseServiceImpl<PK extends Serializable, T> implements Bas
 			if(ps!=null){
 				ps.close();
 			}
-			if(connection!=null){
-				connection.close();
-			}
+//			if(connection!=null){
+//				connection.close();
+//			}
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
@@ -245,9 +245,9 @@ public abstract class BaseServiceImpl<PK extends Serializable, T> implements Bas
 			if(ps!=null){
 				ps.close();
 			}
-			if(connection!=null){
-				connection.close();
-			}
+//			if(connection!=null){
+//				connection.close();
+//			}
 		} catch (Exception e) {
 			e.printStackTrace();
 		}