abel533 / Mybatis-Spring

这是一个集成了Mybatis分页插件和通用Mapper的示例项目
941 stars 610 forks source link

可以配置多数据源吗? #27

Open zcc225 opened 6 years ago

zcc225 commented 6 years ago

尝试配置多数据源没成功,,,,

abel533 commented 6 years ago

能直接搜到很多相关的文章。

dear-Alice-moon commented 5 years ago

可以的,晚上有很多多数据源配置博客。Spring框架本身就支持多数据源配置。

ivwsai commented 5 years ago

自己实现 AbstractRoutingDataSource

Alice-moon notifications@github.com 于2019年3月19日周二 下午4:17写道:

可以的,晚上有很多多数据源配置博客。Spring框架本身就支持多数据源配置。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/abel533/Mybatis-Spring/issues/27#issuecomment-474240415, or mute the thread https://github.com/notifications/unsubscribe-auth/ACxdgPvNDWmIzVCGREkZpSGkk5UC2EKtks5vYJ0hgaJpZM4PlE_z .

dear-Alice-moon commented 5 years ago

自己实现 AbstractRoutingDataSource Alice-moon notifications@github.com 于2019年3月19日周二 下午4:17写道: 可以的,网上有很多多数据源配置博客。Spring框架本身就支持多数据源配置。 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#27 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACxdgPvNDWmIzVCGREkZpSGkk5UC2EKtks5vYJ0hgaJpZM4PlE_z .

  好像就是实现这个类,还需要用到 ThreadLocal 类。