Mybatis整合log4j,延迟加载

a.添加log4j和commens-logging的jar包, b.然后在mybatis的配置文件conf.xml中开启日志 如果不指定,Mybatis就会根据以下顺序 寻找日志 SLF4J →Apache Commons Logging →Log4j 2 → Log4j →JDK logging c.编写配置日志输出文件log4j.properties,具体怎么编写日志文件,这里就不再解释了。
相关文章
相关标签/搜索