PIG 整合 Oracle 数据库 Nacos 注册中心
Nacos 从 2.2.0 版本开始,可通过 SPI 机制注入多数据源实现插件,并在引入对应数据源实现后,便可在 Nacos 启动时通过读取 application.properties 配置文件中 spring.datasource.platform 配置项选择加载对应多数据源插件。
Nacos 官方默认实现 MySQL、Derby,其他类型数据库接入需要参考下文自己扩展。
自定义 oracle 插件
1. 添加 oracle 插件
依赖已上传 maven 中央仓库,请勿使用阿里云代理
2. 导入 nacos oracle 数据库脚本
3. 配置 nacos 数据源链接信息
4. 指定 nacos 数据源平台
源码地址:https://github.com/pig-mesh/nacos-datasource-plugin-oracle 插件加入到 pig-register 即可使用
https://github.com/pig-mesh/pig 点击 Star 关注更新,基于 Spring Cloud 2022、Spring Boot 3、Spring Authorization Server 的微服务平台
♥️ 获取支持
遇到问题?
如果您在使用过程中遇到任何问题、有功能建议或需求,请点击此卡片前往 Gitee 仓库提交 Issue。