File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
src/main/java/org/mybatis/spring/batch Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -92,22 +92,11 @@ public void afterPropertiesSet() throws Exception {
9292 notNull (queryId , "A queryId is required." );
9393 }
9494
95- @ Override
96- protected void doOpen () throws Exception {
97- super .doOpen ();
98- sqlSessionTemplate = new SqlSessionTemplate (sqlSessionFactory , ExecutorType .BATCH );
99- }
100-
101- @ Override
102- protected void doClose () throws Exception {
103- if (sqlSessionTemplate != null ) {
104- sqlSessionTemplate .close ();
105- }
106- super .doClose ();
107- }
108-
10995 @ Override
11096 protected void doReadPage () {
97+ if (sqlSessionTemplate == null ) {
98+ sqlSessionTemplate = new SqlSessionTemplate (sqlSessionFactory , ExecutorType .BATCH );
99+ }
111100 Map <String , Object > parameters = new HashMap <>();
112101 if (parameterValues != null ) {
113102 parameters .putAll (parameterValues );
You can’t perform that action at this time.
0 commit comments