Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

springboot+mybatis配置多数据源中出现sqlsession没有注册的问题 #39

Closed
KayanoChen opened this issue Feb 1, 2018 · 0 comments

Comments

@KayanoChen
Copy link

您好,我将您的源码中springboot+mybatis配置多数据源的例子在本地运行并开启mybatis的日志记录,将日志打印在控制台上(application.properties中配置mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl),出现下列信息:
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@35fb98e0] was not registered for synchronization because synchronization is not active
JDBC Connection [com.mysql.jdbc.JDBC4Connection@1ee12713] will not be managed by Spring
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@35fb98e0]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@23ab6eb5] was not registered for synchronization because synchronization is not active

这种情况下数据能够取到,但是SqlSession 没有被spring管理(SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@23ab6eb5] was not registered for synchronization because synchronization is not active),不知道是否druid是否生效(JDBC Connection [com.mysql.jdbc.JDBC4Connection@1ee12713] will not be managed by Spring),请问这些日志是什么导致的呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants