---------------------siwuxie095
SSM 框架整合的其它方式
1、主要是整合Spring 框架和 MyBatis 框架时,可以不写
MyBatis 核心配置文件:mybatis-config.xml
2、把MyBatis 核心配置文件中的配置全都转移到Spring
核心配置文件中
3、具体实现
applicationContext.xml:
version="1.0"encoding="UTF-8"?> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" 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/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
注:主要针对sqlSessionFactory的Bean 做修改
【made by siwuxie095】