讨论区 > 技术交流 > springboot项目,本地运行正常,打jar包部署后日志显示事务未同步,详细日志如下。

springboot项目,本地运行正常,打jar包部署后日志显示事务未同步,详细日志如下。

泽木而栖 发布于2020-12-24 14:02:48   59浏览

Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6af00152]

Creating a new SqlSession

SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@69dbeb99] was not registered for synchronization because synchronization is not active

JDBC Connection [HikariProxyConnection@55287137 wrapping com.mysql.cj.jdbc.ConnectionImpl@5b53f0ff] will not be managed by Spring

==> Preparing: select province,count(orgId) orgNumber from t_org group by province

==> Parameters:

<== Columns: province, orgNumber

<== Row: 510000, 3

<== Total: 1

Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@69dbeb99]

Creating a new SqlSession

SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6809a204] was not registered for synchronization because synchronization is not active

JDBC Connection [HikariProxyConnection@1589124031 wrapping com.mysql.cj.jdbc.ConnectionImpl@5b53f0ff] will not be managed by Spring

评论( 2
我要评论
  1. 情系半生 2020-12-24 14:05:20
    原因是service 没有加@transactional 注解 未加注解的情况下,出现异常的时候spring将不会回滚事物 一般情况下 只有对数据有增删改操作才具体加在具体的类方法上
    (0) 回复 举报
  2. 江南的故事酒馆 2020-12-24 14:07:13
    是不是触发了事务,但是发现事务失效了。导致报错
    (0) 回复 举报

还可以上传7

表情
  • 微信扫码加好友进群