这篇文章资料来自于网络,对部分知识整理,这里只是记录一下,仅供参考。
跨库,表关联的查询,实现起来很简单:
select a.uid from ucenter.user a , database user_profile b where a.uid = b.uid;
只要在表的前边加上库名即可。
这个是我项目中xml 中的一个例子,项目采用的是springmvc,持久层框架就是mybatis:
项目的数据源配置:
参考
https://blog.51cto.com/u_16175431/7250160