数据源bean,ibatis核心beans,spring事务bean
配置项说明
cuntaosccDataSource:分库分表数据源,appName数据库代号从dba获得,appRuleFile分库分表配置文件,useLocalConfig使用本地配置。
sqlMapClientPartition和sqlMapClientTemplatePartition:创建SqlMapClientTemplate,该类为ibatis执行sqlmap语句的核心实现类。
其中:configLocations是ibatis的sql配置总文件。
transactionManagerPartition是spring的事务控制器,tx:advice标志adviser,aop:pointcut中是切口。
beans-persisstence.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
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/tx