- Cannot change the ExecutorType when there is an existing transaction
https://github.com/mybatis/spring/issues/398

TransientDataAccessResourceException: Cannot change the ExecutorType when there is an existing transaction · Issue #398 · mybati

I'm getting this exception that blocks the execution of my batch process: org.springframework.dao.TransientDataAccessResourceException: Cannot change the ExecutorType when there is an existing ...

github.com



- application.yml

# for SqlSessionTemplate (for execution via mapper method)
mybatis.executor-type=BATCH
# for SqlSessionFactory (for execution without mapper method)
mybatis.configuration.default-executor-type=BATCH

mybatis.configuration.default-executor-type 설정시 SqlSessionTemplate에서 defaultExecutorType을 사용하기 때문에 별도 설정 빌요 없음

Posted by 張's blog
,