记一次bug: webmvc项目下, 关于 XXMapper注入不进去
作者:互联网
原因是: web.xml要加上这样一段
<!-- 配置 ContextLoaderListener 加载 Spring 配置文件 -->
<!-- needed for ContextLoaderListener -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-persist-*.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>
标签:webmvc,xml,web,spring,contextConfigLocation,classpath,persist,bug,XXMapper 来源: https://www.cnblogs.com/diygou/p/15132241.html