Mybatis-Plus报Invalid bound statement (not found)
发布日期:2021-11-11 12:48:04 浏览次数:2 分类:技术文章

本文共 1033 字,大约阅读时间需要 3 分钟。

1、排查Mapper是否正确

@Mapperpublic interface TableMapper extends BaseMapper
{}

2、检查Mybatis-Plus的yml配置

mybatis-plus:  mapper-locations: classpath*:mybatis/mapper/*.xml  type-aliases-package: com.grgbanking.metadatamanage.model.pojo  configuration:    map-underscore-to-camel-case: true    use-generated-keys: true  config-location: classpath*:mybatis/mybatis-config.xml

3、检查pom.xml

com.baomidou
mybatis-plus-boot-starter
3.1.2
com.baomidou
mybatis-plus-annotation
3.1.2
com.baomidou
mybatis-plus-extension
3.1.2

4、检查POJO,会不会遗漏这两个注解 @TableName @TableId

@Data@EqualsAndHashCode(callSuper = false)@Accessors(chain = true)@TableName("t_table")public class Table {    /**     * 主键     */    @TableId(value = "id",type = IdType.AUTO)    private Long id;}

转载地址:https://blog.csdn.net/Carson073/article/details/120136648 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:SpringMVC Controller List参数的校验工具方法
下一篇:Java常见线上问题排查及其工具使用

发表评论

最新留言

不错!
[***.144.177.141]2024年04月09日 23时33分44秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章