Skip to content

mybatis plus invaild bound statement #12

@zoeminghong

Description

@zoeminghong

描述:

在调用 mybatis plus 自带的方法的时候,报出 invaild bound statement 问题,在启动的时候也没有 mybatis logo 信息。所以我怀疑是 mybatis plus 没有启用。

网上有很多是通过自己实现 sqlSessionFactory 方式,但现在都 spring boot 年代,肯定不可能需要自己写,除非没有引入 boot-start 包。但由于使用的是公司内部的封装框架,本身就自带了 plus 相关的依赖,我以为已经引用了,所以觉得很奇怪的。用 Idea 查找 MybatisPlusAutoConfiguration 没有找到,估计就是没有引用该 boot start 包。

方案:

引用

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
        </dependency>

参考文档:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions