Mybatis 不加载xml文件

检查yml文件配置是否正确

  mapper-locations:
    - classpath:com/chz/eduservice/mapper/xml/*.xml

在pom中添加如下配置

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

重新打包maven文件

posted @ 2020-08-01 15:52  CyberPelican  阅读(526)  评论(0编辑  收藏  举报