zoukankan      html  css  js  c++  java
  • 错误,各种错误

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.logging.LogException: Error setting Log implementation.  Cause: java.lang.NoClassDefFoundError: org/apache/log4j/Priority

     

     
    <!--下面这三个是配套使用:http://blog.csdn.net/woshiwxw765/article/details/7624556-->
    <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>${log4j.version}</version>
    </dependency>

    <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>${slf4j.version}</version>
    </dependency>

    <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>${slf4j.version}</version>
    </dependency>
    <!-- 日志文件管理包 end -->

    加上Log4J日志就好了

     

     

    另外,Mybatis 跟 mybatis-spring的 版本不匹配的时候,也会弹出异常。

     

  • 相关阅读:
    ThreadPoolExecutor使用介绍
    apache和tomcat区别(转)
    ThreadFactory的理解
    Tomcat报45秒无法启动错误修改方法
    快速排序
    冒泡排序
    矩阵快速幂
    CF#524-C
    CF#524-B
    hdu3308—LCIS
  • 原文地址:https://www.cnblogs.com/zbw911/p/6195004.html
Copyright © 2011-2022 走看看