SSM中的静态资源导出问题

2021-11-15 14:31:15 浏览数 (1)

静态资源导出问题 ==> 目的是把src/main/java和src/main/resource目录中的xml文件和properties配置文件包含到输出结果中,输出到classes目录中

注意:该段代码要与<dependecies>标签同级,父标签是<project>

代码语言:javascript复制
	<!--静态资源导出问题-->
    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
    </build>

0 人点赞