maven中单元测试引用main目录下resources文件

通过testResources标签指定

<build>
    <testResources>
        <testResource>
            <directory>src/main/resources</directory>
        </testResource>
        <testResource>
            <directory>src/main/config/${running.env}</directory>
        </testResource>
    </testResources>
</build>