mybatisplus使用樂觀鎖報錯Caused by: org.apache.ibatis.binding.BindingException: Parameter ‘MP_OPTLOCK_VERSI
技術標籤:mybatisplusjava
mybatisplus使用樂觀鎖報錯Caused by: org.apache.ibatis.binding.BindingException: Parameter ‘MP_OPTLOCK_VERSION_ORIGINAL’ not found. Available parameters are [param1, et]
在用OptimisticLockerInterceptor遇到上邊錯誤,是因為在mybatisplus 3.4.1版本OptimisticLockerInterceptor是過時的,很容易用成OptimisticLockerInner
-
資料庫加上version欄位,預設為1
-
實體類加上@Version註解
-
編寫測試類
@Test void OptimisticLockerInterceptor(){ User user =userMapper.selectById(1L); user.setName("看人"); user.setEmail("[email protected]"); userMapper.updateById
-
測試通過
相關推薦
mybatisplus使用樂觀鎖報錯Caused by: org.apache.ibatis.binding.BindingException: Parameter ‘MP_OPTLOCK_VERSI
技術標籤:mybatisplusjava mybatisplus使用樂觀鎖報錯Caused by: org.apache.ibatis.binding.BindingException: Parameter ‘MP_OPTLOCK_VERSION_ORIGINAL’ not found. Available parameters are [param1, et]
解決報錯org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):com.tuniu.dao.
意思是沒有找到com.tuniu.dao.CategoryDao.findAll 這種情況,一般都是配置檔案出了問題,配置對映不對.
錯誤排查:Caused by: org.apache.ibatis.exceptions.PersistenceException
技術標籤:java筆記分享mysqlspring bootmybatis 錯誤提示: [aad8bbfc419f1d20]Caused by: org.apache.ibatis.exceptions.PersistenceException:
SpringBoot整合Mybatis-Plus報錯org.apache.ibatis.binding.BindingException
SpringBoot整合Mybatis-Plus報錯org.apache.ibatis.binding.BindingException Mapper介面,被Spring注入後,卻無法正常的使用mapper.xml的sql;你的介面已經成功的被掃描到,但是當Spring嘗試注入一個代理(MyBatist
解決org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ahau.dao.SaleDao.insertSale的報錯
解決org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ahau.dao.SaleDao.insertSale的報錯。
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.atguigu.eduservice.mapper.EduCourseMapper.getPublishCourseInfo
報錯資訊: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.atguigu.eduservice.mapper.EduCourseMapper.getPublishCourseInfo
MyBatis Error:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)(IDEA)...
>>> JDK:1.8 專案結構: MyBatis:依賴 遇到問題:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
解決org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)問題
使用idea解決一個煩人的問題 BindingException 直接上圖我使用的是IDEA,對於這個異常除了上網自己找到的那些什麼名字錯了等等;
如何解決org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):問題
mybatis報錯:Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.yth.dao.IProductDao.getProductWithType
記一個因resources路徑引發的org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
閱讀本文需要 5 分鐘 前言 通常來說,這個 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 就是介面的方法找不到對應Mapper檔案的statementId(namespace + id)
IDEA異常解決: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
最近在做一個部落格專案用Springboot框架開發,在配置好Mapper介面後啟動專案,IDEA報org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)異常。
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.XX.XX.dao.XX.XXX
記錄一下今天發生的傻逼事情 今天下午在寫介面的時候,特別的順利,但是在寫一個模組的功能的時候突然出現了以下報錯資訊,我直接懵逼了
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 錯誤解決方式
起因: 在打包後執行jar包是會出現如下錯誤: Invocation of init method failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):com.***.***.;
sonar-scanner報錯Caused by: net.sourceforge.pmd.lang.java.ast.ParseException: Line 88, Column 37: Cannot use the diamond generic notation when running in JDK inferior to 1.7 mode!
原因是沒有加jdk的編譯版本 如果是在命令列執行,則需要加-Dsonar.java.source=11 如果使用到了sonar-project.properties, 則加入sonar.java.source=11即可
Redis報錯: Caused by: io.lettuce.core.RedisConnectionException: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, ...
錯誤提示如下: org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is io.lettuce.core.RedisException: io.lettuce.core.RedisConnectionException: DENIED Redis is runni
nacos報錯Caused by: com.alibaba.nacos.api.exception.NacosException: java.net.UnknownHostException: jmenv.tbsite.net
今天配置了nacos服務,然而單機模式一直可以,叢集模式一直失敗。 系統環境
uni-app打包報錯Caused by: com.android.tools.r8.errors.CompilationError: Program type already present:
uni-app打包Android外掛報錯Caused by: com.android.builder.multidex.D8MainDexList$MainDexListException: com.android.tools.r8.errors.CompilationError: Program type already present: ...
Sqoop報錯Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
Error: java.io.IOException: Can\'t export data, please check failed map task logs at org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:112)
Redisson報錯Caused by: java.lang.IllegalArgumentException: RIVER
spring整合redisson,啟動專案報錯:Caused by: java.lang.IllegalArgumentException: RIVER package com.user.base.utils.redis.redisson;
專案啟動報錯Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.ImageFormatException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name \'captchaService\' defined in ServletContext resource [/WEB-INF/captcha-context.xml]: Cannot resolve reference