在spring-config-datasource.xml中配置:
<ds:ibatis-config> <ds:sql-map-client id="sqlMapClient2" datasource-ref="riskBasicDataSource2" config-location="classpath:sqlmap-config.xml"/> </ds:ibatis-config> <ds:datasource-config> <ds:datasource id="riskBasicDataSource2" url="${mysql.riskBasic.master.url2}" username="${mysql.riskBasic.master.username2}" password="${mysql.riskBasic.master.password2}" max-pool-size="50" default="true"> </ds:datasource> </ds:datasource-config>