zoukankan      html  css  js  c++  java
  • 数据库框架的log4j日志配置

    Hibernate

    log4j.logger.org.hibernate.tool.hbm2ddl=debug
    log4j.logger.org.hibernate.engine.transaction=debug

    Mybatis

    在mybatis配置中添加下面的配置

    1 <settings>
    2     <setting name="logImpl" value="LOG4J" />
    3 </settings>

    在spring的SqlSessionFactory配置中添加以下配置

    1 <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
    2     <property name="configuration">
    3         <bean class="org.apache.ibatis.session.Configuration">
    4             <property name="logImpl" value="org.apache.ibatis.logging.log4j.Log4jImpl" />
    5         </bean>
    6     </property>
    7 </bean>

    在项目中的dao层中修改Level

    com.mybatis.demo.dao=debug

  • 相关阅读:
    页面的加载过程
    free 命令
    linux chmod命令(转)
    less 命令(转)
    cat 命令(转)
    cp 命令(转)
    mv命令(转)
    rm 命令(转)
    mkdir命令
    Docker网络基础
  • 原文地址:https://www.cnblogs.com/silfox/p/8375878.html
Copyright © 2011-2022 走看看