MyBatis的mapper.xml文件放在非resources文件夹下的读取方法

在pom.xml中加入以下代码:

<build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
posted @ 2020-05-25 13:29  yukinon  阅读(2618)  评论(0编辑  收藏  举报