Maven identify a resource file in the src-main-java

Maven default only recognizes the resource files in the src-main-resources, if resources are placed in a maven project under src-main-java, we need to let Maven know. In pom.xml, the project root node, add the following:

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

 

Guess you like

Origin blog.csdn.net/haoranhaoshi/article/details/93316581