maven打成jar包找不到yml配置文件

在pom文件中添加以下配置

        <resources>
            <!--扫描到的mapper配置-->
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

 

posted @ 2020-09-23 20:19  y-xs  阅读(3250)  评论(0编辑  收藏  举报