如题,自己写的curd方法的事务是被spring管理的,调用mybatis-plus的方法则出现下面的问题 Creating a new SqlSession org.mybatis.spring.SqlSessionUtils : SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1831a06d] was not registered for synchronization because synchronization is not active o.m.s.t.SpringManagedTransaction : JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@61ce1ee0] will not be managed by Spring
Comment From: qmdx
你的姿势不对吧
Comment From: liuxianshengCn
怎么解决的?我这边也是这样,数据库有数据,查询出来是null
Comment From: Linyuzai
你是不是直接用的Active Record,如果是DO直接继承Model调用的增删改,我看代码好像没有通过service和mapper,直接获取了一个sqlsession,或者可能Spring没有扫描到,我这边也是这样。换成service调用就好了。
Comment From: Lixianshengchao
Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@356341c9] was not registered for synchronization because synchronization is not active JDBC Connection [ProxyConnection[PooledConnection[com.mysql.jdbc.JDBC4Connection@6efd0a6e]]] will not be managed by Spring
Comment From: biubiue
怎么就关了呢?解决方案呢
Comment From: wangran99
求解决方案
Comment From: DInTheName
解决方案呢。。。。这么秀,直接关?