当前位置:网站首页>How to configure multiple data sources
How to configure multiple data sources
2022-06-10 13:12:00 【An immortal pleasant goat】
yaml The configuration file
spring:
aop:
auto: true
dal:
dialect: oracle
use-multi-datasource: true
multiDatasource:
default:
type: com.alibaba.druid.pool.DruidDataSource
username: 1111
password: 1111
url: jdbc:oracle:thin:@//10.11.11.120:1521/11111
driver-class-name: oracle.jdbc.OracleDriver
druid:
testWhileIdle: true
validationQuery: SELECT 1 FROM DUAL
maxWait:
his:
type: com.alibaba.druid.pool.DruidDataSource
username: 1111
password: 1111
url: jdbc:oracle:thin:@//10.11.11.120:1521/22222
driver-class-name: oracle.jdbc.OracleDriver
druid:
testWhileIdle: true
validationQuery: SELECT 1 FROM DUAL
maxWait:
Using annotations @MultiDataSource(“ data source ”) Select data source
@MultiDataSource("his")
public PageInfo<EsOrderDto> queryDBorder(OrderInsectDto orderInsectDto) {
// Write query code inside
}
边栏推荐
- What if the xshell evaluation period has expired? Follow the steps below to solve the problem!
- Stereo vision based semantic 3D object and ego motion tracking for automotive driving
- 【深度学习】基于深度学习Autoencoder的信用卡欺诈异常检测,效果非常牛逼
- 启牛能开户吗,在启牛开户安全么
- [flinlk] dynamic Kerberos authentication in Flink pit
- Automatic Mapping of Tailored Landmark Representations for Automated Driving and Map Learning 论文阅读
- VDO-SLAM源码阅读笔记[1] Track()中动态obj部分
- Dynaslam ii: carefully coupled multi object tracking and slam
- Shi Yigong and other teams posted on the cover of Science: AI and freeze electron microscope revealed the structure of "atomic level" NPC, a breakthrough in life science
- 蔚来:“拿捏”了数据,“扭捏”着未来
猜你喜欢

MySQL master database operation large table DDL, slave database crash and system parameter error setting

change system time

Creating basic stacks and queues in C language

client-go gin的简单整合六-list-watch二(关于Rs与Pod以及Deployment的完善)

Unity typewriter to automatically roll text to the bottom of the text box

Tidb Primary course experience 8 (Management Maintenance of Clusters, add a tikv Node)

從解讀 BDC 自動生成的代碼談起,講解 SAPGUI 的程序組成部分

How can the team be dissolved...

【深度学习】基于深度学习Autoencoder的信用卡欺诈异常检测,效果非常牛逼

MYSQL 主库操作大表DDL ,从库崩溃与系统参数错误设置
随机推荐
Vdo-slam source code reading notes [1] dynamic obj part in track()
excel异步导出
OFFICE技术讲座:标点符号-中文-竖排
Automatic Mapping of Tailored Landmark Representations for Automated Driving and Map Learning 论文阅读
Summary of Kitti related information
CF894C Marco and GCD Sequence
[summary] individual competition supplement POJ - 3041 asteroids & codeforces - 173b chamber of Secrets
Tidb Primary course experience 8 (Management Maintenance of Clusters, add a tikv Node)
SAP Field Service Management 和微信集成的案例分享和实现介绍
Stereo vision based semantic 3D object and ego motion tracking for automotive driving
Mysql database (26): View
Technology sharing | quick intercom, global intercom
ASP. Net using imagemap control to design navigation bar
Wei Lai: "pinches" the data and "pinches" the future
MySQL service evolution
CMakeLists.txt 如何编写
JS global timer case
Unity3d uses URP rendering pipeline to realize ar shadow (shadow casting and transparent ground)
汇编语言入门-总结
Use and inspection of safety tools and instruments