springboot整合mybatis 异常 org.apache.ibatis.binding.BindingException: Invalid bound statement ,not found:

出现异常原因: 1.IDEA 编译时,没有将mapper.xml文件编译进去

        2.application.yml 文件没有指定 mapper.xml 的路径

        正确配置

mybatis:
          mapperLocations: classpath*:club/wenfan/youtube/mapper/xml/*.xml
          type-aliases-package: club.wenfan.youtube.bean

pom.xml 中添加

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

两点缺一,都会处出现mapper.xml 文件找不到异常