zhonglinlin1305 / Spring

spring mvc,spring,分别与jdbctemplate,hibernate,mybatis全注解整合,其中包括包含有spring动态代理,数据库的事务处理。以及动态数据源的切换!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

不能同时使用三种数据源

cbyniiaii opened this issue · comments

是根据web.xml来决定使用那种方式的,并不是多种方式并存的。

可以切换的,在springwithjdbc的配置文件(applicationContextwithjdbc.xml)中配置多个数据源,然后在DatabaseContextHolder类中添加设置数据源,在同一个请求中,都可以动态切换,并不是web.xml决定的