栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

SSM整合

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

SSM整合

org.springframework

spring-webmvc

${spring.version}

[](

)3.mybatis以及spring整合mybatis相关jar包

org.mybatis

mybatis

3.4.5

org.mybatis

mybatis-spring

2.0.5

[](

)4.连接数据库相关jar包

com.alibaba

druid

1.1.22

mysql

mysql-connector-java

5.1.47

[](

)5.日志相关jar包

log4j

log4j

1.2.17

org.slf4j

slf4j-api

1.7.10

org.slf4j

slf4j-log4j12

1.7.10

[](

)6.测试相关jar包

junit

junit

4.12

test

[](

)二、配置文件


[](

)1.spring整合mybatis spring-mybatis.xml

[](

)jdbc.properties

jdbc.driverClassName=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/videos?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8

jdbc.username=root

jdbc.password=123456

initialSize=5

maxActive=20

maxWait=2000

[](

)spring-mybatis.xml

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”

xmlns:context=“http://www.springframework.org/schema/context”

xmlns:tx=“http://www.springframework.org/schema/tx”

xsi:schemaLocation="

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd">

[](

)2.springMVC配置文件

[](

)spring-mybatis.xml

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”

xmlns:context=“http://www.springframework.org/schema/context”

xmlns:mvc=“http://www.springframework.org/schema/mvc”

xsi:schemaLocation="

http://www.springframework.org/schema/beans

http://www.springframewo

【一线大厂Java面试题解析+核心总结学习笔记+最新架构讲解视频+实战项目源码讲义】

浏览器打开:qq.cn.hn/FTf 免费领取

rk.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc.xsd">

mvc:default-servlet-handler/

mvc:annotation-driven/

mvc:interceptors

mvc:interceptor

[](

)3.mybatis配置文件

[](

)mybatis-config.xml

此文件多用与配置一些在spring-mybatis文件中不方便配置的东西

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/356888.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号