MyBatisPlus 报MP_OPTLOCK_VERSION_ORIGINAL not found. Available parameters are错误
配置mybatisplus乐观锁的过程
1、在数据库表中添加version字段类型int
2、在实体类中增加version属性,属性上增加@Version注解
3、配置乐观锁插件
@Configuration
public class MyBatisConfig { //乐观锁插件
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor(){
MybatisPlusInterceptor interceptor =new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
return interceptor;
}
}
提示Parameter 'MP_OPTLOCK_VERSION_ORIGINAL' not found. Available parameters are [param1, et]是因为mybatisplus版本的原因, 新的版本这样配置相当于没有生效,老本的是OptimisticLockerInterceptor已经过时了
参考:https://baomidou.com/pages/0d93c0/#_1-%E9%85%8D%E7%BD%AE%E6%8F%92%E4%BB%B6
MyBatisPlus 报MP_OPTLOCK_VERSION_ORIGINAL not found. Available parameters are错误的更多相关文章
- SpringBoot集成MybatisPlus报错
SpringBoot集成MybatisPlus报错 启动的时候总是报如下错误: java.lang.annotation.AnnotationFormatError: Invalid default: ...
- 解决JS中missing ( before function parameters的错误
在编写javascript中,常出现在function处提示“missing ( before function parameters”的错误,这是怎么回事? 例如: function String. ...
- 登陆Oracle,报oracle initializationg or shutdown in progress 错误提示
前两天,登陆Oracle,发现登陆不上去了,报”oracle initializationg or shutdown in progress 错误提示” 错误. 然后就想着怎么去解决,首先自己到win ...
- 使用tortoisegit工具git地址中带号码密码的拉取,以及使用这种方式后中途重置密码报git remote: HTTP Basic: Access denied 错误解决办法
1. 在拉取git项目时可以在地址中直接指定号码密码如下就可以直接拉取下来 https://username:password@github.com 需要注意,因为在解析地址时是以@符号作为地址信 ...
- Hbase启动hbase shell运行命令报Class path contains multiple SLF4J bindings.错误
1:Hbase启动hbase shell运行命令报Class path contains multiple SLF4J bindings.错误,是因为jar包冲突了,所以对于和hadoop的jar包冲 ...
- 用element-ui 时,报value.getTime is not a function错误:
在用element-ui 时,报value.getTime is not a function错误:错误分析:date-picker 的时间是格林威时间,如果Thu Jun 22 2017 19:07 ...
- delphi 10.1 berlin datasnap提交clientdataset.delta报:invalid variant type conversion(类型转换错误)问题的解决
delphi 10.1 berlin datasnap提交clientdataset.delta报:invalid variant type conversion(类型转换错误)问题的解决,需要打这个 ...
- Windows任务计划向远程服务器拷贝文件,报登录失败: 未知的用户名或错误密码
问题产生很奇怪,当你登录到系统时,执行自动化作业是正常 但到了晚上凌晨自动执行作业时,则报登录失败: 未知的用户名或错误密码 解决方案: 在拷贝脚本中加及一行,创建net use 命名,每次文件拷贝前 ...
- jenkins添加环境变量 ,win 10的 环境变量如下,win7 就是不加也可以运行,不报 “python 不是内部命令 ” 的错误。
jenkins 添加win 10的 环境变量如下,win7 就是不加也可以运行,不报 “python 不是内部命令 ” 的错误,暂时不知道怎么回事. jenkins这样添加环境变量 .
- 运行nodejs项目报Process finished with exit code 1 错误
在项目中,明明在别人的机子上项目可以运行,但是复制到自己的电脑就无法就无法启动.报Process finished with exit code 1错误,也没提示错误地方.自己倒腾了很久总结了几个解决 ...
随机推荐
- CF335F Buy One, Get One Free
\(\text{Solution}\) 其实不想写(因为不好写... 所以贴贴 \(\text{Solution}\) 然而就关于这题而言讲得也不太清楚 可撤销贪心就是维护当前状态的最优解,同时考虑以 ...
- JMeter BeanShell 学习
JMeter BeanShell 学习 Beanshell分为: JMeter有如下BeanShell组件: 定时器: BeanShell Timer 前置处理器:BeanShell PreProce ...
- VScode本地搭建服务代码如何让其他人访问?
如本地开发域名访问: http://127.0.0.1:5500/pages/information/information.html?id=2259 想让别人访问: win+R -------> ...
- day07-MyBatis的关联映射01
MyBatis的关联映射 Mybatis的关联映射 实际的开发中,对数据库的操作常常会涉及到多张表,这在面向对象中就涉及到了对象与对象之间的关联关系.针对多表之间的操作,MyBatis提供了关联映射, ...
- Tensorflow 1.X 在windows上的安装
参考:https://blog.csdn.net/weixin_42326479/article/details/105539110 pip install -i https://pypi.douba ...
- 记录C#学习过中看到的文章
1.DataRow 转实体类 https://www.cnblogs.com/macT/p/10878863.html https://www.cnblogs.com/yangboyu/archive ...
- vue 退出登录页面跳转 浏览器localStorage中的值没有改变
vuex中的loginout方法actions:{ loginout(data:string){ return new Promise(((resolve, reject)=>{ setTime ...
- [BOM] 封装一下cookie
function get_cookie(key) { var arr, reg = new RegExp("(^| )" + key + "=([^;]*)(;|$)&q ...
- SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory 解决办法
[oracle@localhost oracle]$ ./sqlplus Error 6 initializing SQL*Plus Message file sp1<lang>.msb ...
- Centos 升级glibc 亲测好用
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz tar zxf glibc-2.18.tar.gz cd glibc-2.18/ mkdir ...