当前使用版本(必须填写清楚,否则不予处理)
3.2.0
该问题是怎么引起的?(最新版上已修复的会直接close掉)
代码生成器生成了一个ActiveRecord模式继承自Model
MybatisConfiguration mybatisConfiguration = new MybatisConfiguration();
mybatisConfiguration.setGlobalConfig(globalConfig);
mybatisConfiguration.setLogImpl(StdOutImpl.class);
mybatisConfiguration.setMapUnderscoreToCamelCase(true);
mybatisConfiguration.setCacheEnabled(true);
mybatisConfiguration.setLocalCacheScope(LocalCacheScope.STATEMENT);
mybatisConfiguration.setDefaultExecutorType(ExecutorType.REUSE);
重现步骤
报错信息
Comment From: ChenYunerer
老哥怎么说,最后有解决方案没,我看Model中的insert等,直接调用DefaultSqlSession的insert方法,之后也不会调用commit,导致缓存没有刷新,其他BaseMapper和ServiceImpl用的都是SqlSession是SqlSessionTemplate没有这个问题。