mybatis-plus在mapper.xml自定义sql问题

mybatis-plus在mapper.xml中自定义查询语句时报如下错误:(找不到自定义的查询方法)

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.company.management.system.mapper.ManageChatMessageMapper#selectLastMessageList

解决方法:在pom.xml <build>中添加如下:

<build>
<resources>
    <resource>
        <directory>src/main/resources</directory>
    </resource>
    <resource>
        <directory>src/main/java</directory>
        <includes>
            <include>**/*.xml</include>
        </includes>
    </resource>
</resources>
</build>

猜你喜欢

转载自www.cnblogs.com/angel-devil/p/12462944.html