当前位置:网站首页>如何配置多数据源
如何配置多数据源
2022-06-10 11:15:00 【打不死的喜羊羊】
yaml配置文件
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:
使用注解@MultiDataSource(“数据源”)选择数据源
@MultiDataSource("his")
public PageInfo<EsOrderDto> queryDBorder(OrderInsectDto orderInsectDto) {
//里面写查询代码
}
边栏推荐
- Common colors: RGB, gray value, color extraction value, transparency.
- 牛客面经02
- 数商云商业服务业SaaS管理系统:实现高效业务协作,助力企业完善数字化转型之路
- dell G7 电脑关闭小键盘
- SqlSessionFactory和SqlSession详解
- 核酸检测机器人
- Jeu plus durable casque sans fil réel, batterie super longue durée de vie, héros G1 en main
- Flutter websocket example
- 解析:稳定币不是「稳定的币」 其本质是一种产品
- 87.(leaflet之家)leaflet军事标绘-直线箭头修改
猜你喜欢

【Question】rxjs/operator takeWhile vs takeUntil

关于单向链表

js通过递归实现树形数据操作

In commemoration of the 16th day of the first month, the total number of visits to the studio exceeded one million

音质出色的降噪旗舰,女毒必选,贝壳王子MO3体验

企评家分不同维度解析:湖南长城科技信息有限公司企业成长性

【万人独木桥】那个夏天—后高考生活该如何安排?

第 1 天 栈与队列(简单)
Common shell commands - 02 compression and decompression

flutter SocketIO示例
随机推荐
基于分布式数据库本身的定时备份方法
About one-way linked list
Kubernetes common commands -1- command completion
How zoom closes the microphone when joining a meeting
H.265编码原理入门
source observable 发生错误之后会直接进入到catchError operator 而不是按照pipe里面的顺序处理之后再进入catchError
第 2 天 链表(简单)
Network Interview Questions
Software testing quality and assurance
Flink CDC 在大健云仓的实践
Nucleic acid detection robot
好玩的人脸识别小软件
zoom如何在加入会议时关闭microphone
Digital supply chain collaboration system for digital commerce cloud communication industry: empowering communication enterprises to improve supply business and enhance market competitiveness
Use matlab to generate COE files of sine wave, triangular wave and square wave
dell G7 电脑关闭小键盘
Is there any difference between exception and error
PV operation daily question - buffer problem
87.(leaflet之家)leaflet军事标绘-直线箭头修改
【Question】rxjs/operator takeWhile vs takeUntil