This commit is contained in:
yyb
2025-05-12 17:00:06 +08:00
parent 9c5b5eba7c
commit 9c93dc1e10
855 changed files with 163903 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>jxy-common</artifactId>
<groupId>com.jxy</groupId>
<version>3.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-datasource</artifactId>
<description>
多数据源配置
</description>
<dependencies>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- Dynamic DataSource -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>${dynamic-ds.version}</version>
</dependency>
<!-- SpringBoot Seata -->
<!-- 注意一定要引入对版本要引入spring-cloud版本seata而不是springboot版本的seata-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
<!-- 排除掉springcloud默认的seata版本以免版本不一致出现问题-->
<exclusions>
<exclusion>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
</exclusion>
<exclusion>
<groupId>io.seata</groupId>
<artifactId>seata-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 上面排除掉了springcloud默认色seata版本此处引入和seata-server版本对应的seata包-->
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("btcdb")
public @interface BTCDB {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("btcdbv2")
public @interface BTCDBV2 {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("btcnochain")
public @interface BTCNoChainDB {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("bian")
public @interface BiAnDb {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("bian2")
public @interface BiAnDb2 {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("binance")
public @interface Binance {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("eth4424v2")
public @interface ETH4424V2DB {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("ethdb")
public @interface ETHDB {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("ethrtdb")
public @interface ETHRTDb {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("ethv2")
public @interface ETHV2DB {
}

View File

@@ -0,0 +1,13 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("help")
public @interface JXYHelp {
}

View File

@@ -0,0 +1,15 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
/**
* 主数据库
*/
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("master")
public @interface Master {
}

View File

@@ -0,0 +1,12 @@
package com.jxy.common.datasource.annotation;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.lang.annotation.*;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@DS("ndaq")
public @interface NDAQDB {
}