您好,欢迎来到爱玩科技网。
搜索
您的当前位置:首页解决:Invalid bound statement (not found): com.melon.mapper.UserMapper.selectById

解决:Invalid bound statement (not found): com.melon.mapper.UserMapper.selectById

来源:爱玩科技网

出现的问题

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.melon.mapper.UserMapper.selectById
	at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235) ~[mybatis-3.5.10.jar:3.5.10]
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.<init>(MybatisMapperMethod.java:50) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.lambda$cachedInvoker$0(MybatisMapperProxy.java:111) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1]
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]

解决方案

没有在对应的实体类主键上加@Tableid

@Data
public class User implements Serializable {
    
    @TableId
    private Integer uid;

加上后启动,解决!成功!

{
    "code": 200,
    "message": "success",
    "data": {
        "loginUser": {
            "uid": 2,
            "username": "lisi",
            "userPwd": null,
            "nickName": "李四",
            "version": 1,
            "isDeleted": 0
        }
    }
}

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- aiwanbo.com 版权所有 赣ICP备2024042808号-3

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务