1、参考《Java Spring MVC项目搭建(一)——Spring MVC框架集成》配置spring mvc需要的jar包及eclipse配置(主要是针对servlet-api.jar)
2、配置项目需要的其它jar包,尤其是mybatis jar包,可以从maven库中http://mvnrepository.com/进行搜索并下载,主要有以下几个jar包,此处我下载的都是最新版:
2.1、commons-logging-1.2.jar:http://mvnrepository.com/artifact/commons-logging/commons-logging (《Java Spring MVC项目搭建(一)——Spring MVC框架集成》)已经配置,可忽略。
commons-fileupload-1.3.2.jar:http://mvnrepository.com/artifact/commons-fileupload/commons-fileupload
commons-io-2.5.jar:http://mvnrepository.com/artifact/commons-io/commons-io
log4j-1.2.17.jar:http://mvnrepository.com/artifact/log4j/log4j
mybatis-3.4.2.jar:http://mvnrepository.com/artifact/org.mybatis/mybatis
mybatis-spring-1.3.1.jar:http://mvnrepository.com/artifact/org.mybatis/mybatis-spring
mysql-connector-java-5.1.40.jar(此处没必要下载最新的,容易造成mysql驱动与mysql版本不匹配导致的无法连接数据库问题):http://mvnrepository.com/artifact/mysql/mysql-connector-java
jstl-1.2.jar:http://mvnrepository.com/artifact/javax.servlet/jstl
aspectjweaver-1.8.10.jar:http://mvnrepository.com/artifact/org.aspectj/aspectjweaver
jackson相关包(jackson-annotations-2.8.0.jar、jackson-core-2.8.1.jar、jackson-databind-2.8.5.jar):http://wiki.fasterxml.com/JacksonDownload
将以上jar包拷贝到/WebContent/WEB-INF/lib目录下,如图所示: