spring
spring copied to clipboard
Mapperfactorybean instantiates a SqlSessionTemplate every time, when there is only one datasource
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()