2015.09.21

maven项目Junit test报:

原因:当前使用slf4j,没有提供log4j包。但是有些框架还在使用log4j。导致找不到

 

解决办法,两步: 
一、在编译路径中添加Log4J的包,比如我一直在用的log4j-1.2.8.jar; 
二、再添加一个叫做slf4j-log4j12-1.5.11.jar的包进行转换,注意到这里的log4j12,可能对应的是log4j 1.2版本

	  <dependency>
		<groupId>log4j</groupId>
	 	<artifactId>log4j</artifactId>
	 	<version>1.2.12</version>
	  </dependency>
  
	<dependency>  
	    <groupId>org.slf4j</groupId>  
	    <artifactId>slf4j-log4j12</artifactId>  
        <version>1.6.4</version>
	</dependency>        

  

2、

mysql创建实例:
1、show databases //显示数据库
2、create database student //创建数据库student
3、use student //进入student数据库

 

mysql执行脚本: 

source d:\sample-data.sql       //d:\sample-data.sql为需要导入的数据文件

\.   d:\sample-data.sql       //d:\sample-data.sql为需要导入的数据文件

 

posted on 2015-09-21 14:24  陈福涛  阅读(159)  评论(0)    收藏  举报