Goto: No. xml problem in the classes file after the MAVEN project was compiled

Source: Internet
Author: User

When doing Spring+mybatiss, the automatic scan is configured correctly, but the following error occurred while running. After looking at the target/classes/.../dao/folder, I found that only the Mapper class file, without the XML file, would not have the following error to put the corresponding XML file into this folder. The reason for this error is that the XML file was not placed in the MAVEN compilation.

Workaround:

Add the following code to the Pom.xml:

<Build>...        <Resources>            <Resource>                <Directory>Src/main/java</Directory>                <includes>                    <include>**/*.xml</include>                </includes>                <filtering>True</filtering>            </Resource>        </Resources>...</Build>

Article citation: http://www.cnblogs.com/wbb2109/p/3999247.html

Goto: No. xml problem in the classes file after the MAVEN project was compiled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.