Low Error

作者: grace666 | 来源:发表于2017-10-24 15:59 被阅读0次

1. BeanCreationException

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManagerController': Injection of autowired dependencies failed

tomcat catelina log中发现

org.mybatis.spring.mapper.ClassPathMapperScanner.doScan No MyBatis mapper was found in '[com.mmall.dao]' package. Please check your configuration.

解决:
applicationContext-datasource.xml 里配置mapperScannerConfigurer

    <bean name="mapperScannerConfigurer"  class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.mall.dao"/>
    </bean>

2. Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]

在maven项目中 web.xml和applicationContext.xml两个文件没放一起

 <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:applicationContext.xml</param-value>
        </init-param>

相关文章

网友评论

      本文标题:Low Error

      本文链接:https://www.haomeiwen.com/subject/rmqxpxtx.html