摘要: 动态数据源查询字段详情 Controller /** * 查询数据库表字段信息 * @param resourceId * @return */ @GetMapping("getTableColumnDetails") public BaseResponse<Object> getTableColu 阅读全文
posted @ 2023-10-31 16:56 Ideaway 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 使用案例 //添加到方法上面即可 @TargetDatasource("oh") public int addDataConfigCatalog(DiitResourceCatalog dataCatalog) { return insertNumber; } @TargetDatasource(" 阅读全文
posted @ 2023-10-31 15:26 Ideaway 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 根据id名称和父id名称构建树结构 package diit.platform.bussiness.utils; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import 阅读全文
posted @ 2023-10-31 15:17 Ideaway 阅读(69) 评论(0) 推荐(0) 编辑
摘要: ### Nginx内置lua版OpenResty拦截转发请求Redis等操作 #### 1 下载并安装OpenResty ```html http://openresty.org/cn/download.html ``` #### 2 下载 lua-resty-http-0.17.1 库 以让ope 阅读全文
posted @ 2023-08-24 13:42 Ideaway 阅读(222) 评论(0) 推荐(0) 编辑
摘要: ### resourceregister库 #### 外部表创建 ```sql -- 导入插件 create extension postgres_fdw; -- 创建服务名称为 operation 的服务 host为ip port为端口 dbname为数据库名称 create server ope 阅读全文
posted @ 2023-06-19 15:57 Ideaway 阅读(132) 评论(0) 推荐(0) 编辑
摘要: ```yml eureka: client: enabled: true fetch-registry: true registry-fetch-interval-seconds: 5 service-url: defaultZone: http://59.195.19.240:31101/eure 阅读全文
posted @ 2023-06-19 15:52 Ideaway 阅读(10) 评论(0) 推荐(0) 编辑
摘要: pom.xml <!--RabbitMQ--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency> appli 阅读全文
posted @ 2023-03-15 14:07 Ideaway 阅读(156) 评论(0) 推荐(0) 编辑
摘要: applyinstIdViewList = applyinstIdViewList .stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>( Comparator.comp 阅读全文
posted @ 2023-03-07 15:41 Ideaway 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 重点概念 多数据源在配置之后是根据service的实现类上面的注解来确定生效范围的,一个实现类可以根据注解代表一个数据库 ServiceImpl import com.baomidou.dynamic.datasource.annotation.DS; //决定用哪个数据源 @DS("slave") 阅读全文
posted @ 2023-02-21 17:42 Ideaway 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 定义策略基类 IStrategy 首先创建基础策略接口,用于定义选择的规则accept(String type); package com.diit.config.domain.module.factory; public interface IStrategy { boolean accept(S 阅读全文
posted @ 2023-02-07 16:34 Ideaway 阅读(45) 评论(0) 推荐(1) 编辑