zoukankan      html  css  js  c++  java
  • mybatis读取配置文件报错:Could not find resource configuration.xml

    1.确保项目结构的正确

    1. 确保资源导入成功

    如果没有成功,在 pom.xml 中添加如下代码,防止资源导出失败的问题。添加以后,任然未成功,清除maven, 重启idea,再次尝试。

    <!--在build中配置resources,来防止我们资源导出失败的问题-->
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
    
  • 相关阅读:
    (六)软件测试分工
    <C++>FILE和fstream
    <C#>序列化
    <C#>多线程
    <C++>面试
    <C#>面试
    <Linux>Linux系统命令
    <Linux>Linux基础知识
    <CAN>汽车诊断基础知识
    <C++>查询
  • 原文地址:https://www.cnblogs.com/lixyuan/p/13401502.html
Copyright © 2011-2022 走看看