Solution to the problem that maven project does not compile xml files

黄舟
Release: 2017-04-01 13:35:16
Original
2404 people have browsed it

Recently I am building a maven+springMVC+mybatis project. When compiling, the **Mapper.xml file generated by mybatis is always not compiled (it does not appear in the classes folder).
The solution is to add

<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>true</filtering>  
                    -->  
                </resource>  
            </resources>
Copy after login
under the tag of maven’s pom.xml folder

The above is the detailed content of Solution to the problem that maven project does not compile xml files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!