当前使用版本(必填,否则不予处理)
3.5.2.3-SNAPSHOT
该问题是如何引起的?(确定最新版也有问题再提!!!)
尝试使用最新的SpringBoot,在3.5.2版本中正常
https://github.com/baomidou/mybatis-plus/pull/4870
重现步骤(如果有就写完整)
任一一个查询都可以复现
报错信息
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): XXXMapper.selectList
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy.lambda$cachedInvoker$0(MapperProxy.java:108) ~[mybatis-3.5.11.jar:3.5.11]
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740) ~[na:na]
at org.apache.ibatis.util.MapUtil.computeIfAbsent(MapUtil.java:35) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy.cachedInvoker(MapperProxy.java:95) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[mybatis-3.5.11.jar:3.5.11]
at jdk.proxy2/jdk.proxy2.$Proxy113.selectList(Unknown Source) ~[na:na]
at com.baomidou.mybatisplus.core.mapper.BaseMapper.selectOne(BaseMapper.java:172) ~[mybatis-plus-core-3.5.2.3-SNAPSHOT.jar:3.5.2.3-SNAPSHOT]
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732) ~[na:na]
at org.apache.ibatis.binding.MapperProxy$DefaultMethodInvoker.invoke(MapperProxy.java:159) ~[mybatis-3.5.11.jar:3.5.11]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[mybatis-3.5.11.jar:3.5.11]
at jdk.proxy2/jdk.proxy2.$Proxy113.selectOne(Unknown Source) ~[na:na]
at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:202) ~[mybatis-plus-extension-3.5.2.3-SNAPSHOT.jar:3.5.2.3-SNAPSHOT]
at com.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:320) ~[mybatis-plus-extension-3.5.2.3-SNAPSHOT.jar:3.5.2.3-SNAPSHOT]
Comment From: linghengqian
-
Can you provide a minimal reproducible example?
-
I just linked to https://github.com/apache/shardingsphere/issues/21225, the example he provided is too big.
Comment From: aispringli
this is a minimal reproducible example demo please create table and config mysql connect info ,then you can run the test com.example.demo.mapper.ScoreMapperTest#testList you also can connect me if you meet any problems
@linghengqian
Comment From: aispringli
@linghengqian I seem to find the reason, the 3.5.2.3-SNAPSHOT is not right depoyed from branch 3.0. I clone the project and only change the version to 3.5.2.4-SNAPSHOT, then publish to local, now the problem not appear. You can do it recurrence. Please deploy 3.5.2.3-SNAPSHOT again or next version like 3.5.2.4-SNAPSHOT.
Comment From: linghengqian
-
You may have misunderstood something, I am not a Committer of Baomidou, and I do not have permission to publish new snapshot versions to the OSS Snapshot repository.
-
@miemieYaho I just want to confirm something, is Mybatis Plus released in the OSS Snapshot repository? I didn't see some configuration related to Gradle Release at https://github.com/baomidou/mybatis-plus/tree/3.0/.github .
Comment From: aispringli
@miemieYaho Please check this problem
Comment From: miemieYaho
https://github.com/baomidou/mybatis-plus/commit/5dad4d4bbb7d4e1868a7a8310e19f38966bc8896