您的位置:首页 > 编程语言 > Java开发

Spring+SpringMVC+Mybatis整合

2016-03-17 08:19 375 查看

Spring4.1.6+SpringMVC+Mybatis3.3.0整合 MySQL5.*+文件上传

1.所需jar与解释

Spring+SpringMVC:
spring-aop-4.1.6.RELEASE.jar
spring-aspects-4.1.6.RELEASE.jar
spring-beans-4.1.6.RELEASE.jar
spring-context-4.1.6.RELEASE.jar
spring-core-4.1.6.RELEASE.jar
spring-expression-4.1.6.RELEASE.jar
spring-jdbc-4.1.6.RELEASE.jar
spring-orm-4.1.6.RELEASE.jar
spring-tx-4.1.6.RELEASE.jar
spring-web-4.1.6.RELEASE.jar
spring-webmvc-4.1.6.RELEASE.jar

        AOP:在Spring2.*中
aopalliance.jar
aspectjweaver.jar

        文件上传:在Struts2中
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar

    Mybatis:
mybatis-3.3.0.jar
asm-4.2.jar
cglib-3.1.jar
commons-logging-1.2.jar
log4j-1.2.17.jar
log4j-api-2.2.jar
log4j-core-2.2.jar
slf4j-api-1.7.12.jar
slf4j-log4j12-1.7.12.jar

    Mybatis与Spring整合:
mybatis-spring-1.2.3.jar

    MySQL驱动包:
mysql-connector-java-5.1.7-bin.jar


  如果使用maven: jar包的dependency搜索

driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3307/wdmall
username=root
password=950906
#定义初始连接数
initialSize=3
#定义最大连接数
maxActive=20
#定义最大空闲
maxIdle=20
#定义最小空闲
minIdle=3
#定义最长等待时间
maxWait=6000


db.properties
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: