mybatis的mapper注入失败

因为处在两个不同的资源文件夹下:

导致classpath无法加载其中一些文件,所以修改为classpath*后顺利进行。

    <!-- 加载spring容器 -->
    <!-- needed for ContextLoaderListener -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:spring/applicationContext*.xml</param-value>
    </context-param>

    <!-- Bootstraps the root web application context before servlet initialization -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

错误如下

原文地址:https://www.cnblogs.com/limingxian537423/p/7581792.html