Make Be BackEnd
[Mybatis] SqlSession was not registered for synchronization because synchronization is not active 본문
Error
[Mybatis] SqlSession was not registered for synchronization because synchronization is not active
Initsave 2024. 6. 19. 22:48
현상
여러 쿼리 동시 사용하면서 작동이 제대로 되지않는다..
원인
' synchronization is not active'는 스프링의 트랜잭션 동기화가 활성화 되지 않았다는 것이다.. !!
해결
스프링 서블릿에 <tx:annotation-driven> 을 통해 활성 설정하자!!
<tx:annotation-driven transaction-manager="transactionManager"/>