The error may exist in com/kuang/dao/UserMapper.xml

The cause of the problem: The xml file was created under the java package, but the configuration file under the resource file was found when maven was running, and the configuration file under the java package could not be imported.
Insert picture description here
Solution:
Add configuration information to the pom file, and you can find the configuration file Up:

<!--在build中配置文件resources,来防止我们资源导出失败的问题-->
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

Guess you like

Origin blog.csdn.net/zhanlong11/article/details/115048663