问题遇到的现象和发生背景
当我打开mybatis查询语句打印时,我发现查询一条语句,控制台打印内容如下:
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@33ea7053] was not registered for synchronization because synchronization is not active
JDBC Connection [org.postgresql.jdbc.PgConnection@74335094] will not be managed by Spring
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@33ea7053]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@2976e207] was not registered for synchronization because synchronization is not active
JDBC Connection [org.postgresql.jdbc.PgConnection@74335094] will not be managed by Spring
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@2976e207]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@73fe69c7] was not registered for synchronization because synchronization is not active
JDBC Connection [org.postgresql.jdbc.PgConnection@74335094] will not be managed by Spring
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@73fe69c7]
......
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1ee37c74] was not registered for synchronization because synchronization is not active
JDBC Connection [org.postgresql.jdbc.PgConnection@74335094] will not be managed by Spring
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1ee37c74]
相同格式的内容至少十几条,
但是结果可以正常的查询出来
我想要达到的结果
我想知道为什么会这样,而且如何消除它们,希望大家可以给我一个解答