spring icon indicating copy to clipboard operation
spring copied to clipboard

Mapperfactorybean instantiates a SqlSessionTemplate every time, when there is only one datasource

Open dfjfj opened this issue 5 years ago • 0 comments

When the sqlSessionTemplateRef of @ mapperscan is not specified, every mapper interface bean will create a SqlSessionTemplate when instantiating the bean. However, the final result shows that only the SqlSessionTemplate added to the container for the first time is passed in the assignment.

This may be the cause of the error: org.mybatis.spring.support.SqlSessionDaoSupport#setSqlSessionFactory()

dfjfj avatar Apr 05 '21 10:04 dfjfj