mybatis-plus自定义sql出现Invalid bound statement

首先是application.yml文件,已按https://mp.baomidou.com/guide/faq.html处理了(添加mapper-locations,pom添加xml打包选项),但问题依旧。

springboot启动类是有添加 @MapperScan的

pom中也将mapper.xml打包进去

Mapper.xml如下:

Mapper如下

目录结构:

值得注意的是在Mapper中使用注解方式@Select是能够正常调用的。同时,mybatis-plus的CRUD也是能正常调用。

个人猜测问题出现在程序找不到mapper.xml,但IDEA中点击方法或者mapper.xml中的namespace都能正常跳转。

求各位大佬帮忙解决,这问题已经困扰我大半天了。

 </build>
        <resources>
            <resource>
                <directory>src/main/java</directory><!--所在的目录-->
                <includes><!--包括目录下的.properties,.xml文件都会扫描到-->
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>