Skip to content

Commit 96cfb97

Browse files
Release v2.3
1 parent 08707c9 commit 96cfb97

File tree

6 files changed

+77
-10
lines changed

6 files changed

+77
-10
lines changed

README.adoc

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use Redis multi-data sources, you need to add the Redis Multi Sources Spring
1717
<dependency>
1818
<groupId>com.childrengreens</groupId>
1919
<artifactId>redis-multi-source-spring-boot-starter</artifactId>
20-
<version>2.2</version>
20+
<version>2.3</version>
2121
</dependency>
2222
----
2323
To use Jedis instead of Lettuce as the client, you need to add the following dependencies:
@@ -139,7 +139,7 @@ To use RabbitMQ multi-data sources, you need to add the AMQP Multi Sources Sprin
139139
<dependency>
140140
<groupId>com.childrengreens</groupId>
141141
<artifactId>amqp-multi-source-spring-boot-starter</artifactId>
142-
<version>2.2</version>
142+
<version>2.3</version>
143143
</dependency>
144144
----
145145
Add the following configuration to your properties file.
@@ -212,6 +212,73 @@ private SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactor
212212
213213
----
214214

215+
216+
=== InfluxDB2 Multi Data Sources
217+
To use InfluxDB2 multi-data sources, you need to add the Influx2 Multi Sources Spring Boot Starter dependency to your project.
218+
[source,xml]
219+
----
220+
<dependency>
221+
<groupId>com.childrengreens</groupId>
222+
<artifactId>influx2-multi-source-spring-boot-starter</artifactId>
223+
<version>2.3</version>
224+
</dependency>
225+
----
226+
Add the following configuration to your properties file.
227+
[source,properties]
228+
----
229+
# set the primary-key data source (must)
230+
spring.multi-sources.influx.primary-key=cn
231+
232+
# cn data source
233+
spring.multi-sources.influx.sources.cn.url=http://127.0.0.1:8086/
234+
spring.multi-sources.influx.sources.cn.token=wkOEKEVJ4jJBUhTwzKLsFVTpqR_JsGR3w6ybS3xTDy67WSaY14W4HQf59r69pX0YDaboNDRo_SrMa_T3clNMPA==
235+
spring.multi-sources.influx.sources.cn.org=cn-market-data
236+
spring.multi-sources.influx.sources.cn.bucket=cn-data
237+
238+
# hk data source
239+
spring.multi-sources.influx.sources.hk.url=http://127.0.0.2:8086/
240+
spring.multi-sources.influx.sources.hk.token=wkOEKEVJ4jJBUhTwzKLsFVTpqR_JsGR3w6ybS3xTDy67WSaY14W4HQf59r69pX0YDaboNDRo_FkMa_T3clNMPA==
241+
spring.multi-sources.influx.sources.hk.org=hk-market-data
242+
spring.multi-sources.influx.sources.hk.bucket=hk-data
243+
244+
----
245+
246+
247+
[source,yml]
248+
----
249+
# set the primary-key data source (must)
250+
spring:
251+
multi-sources:
252+
influx:
253+
primary-key: cn
254+
255+
# cn data source
256+
sources:
257+
cn:
258+
url: http://127.0.0.1:8086/
259+
token: wkOEKEVJ4jJBUhTwzKLsFVTpqR_JsGR3w6ybS3xTDy67WSaY14W4HQf59r69pX0YDaboNDRo_SrMa_T3clNMPA==
260+
org: cn-market-data
261+
bucket: cn-data
262+
263+
# hk data source
264+
hk:
265+
url: http://127.0.0.2:8086/
266+
token: wkOEKEVJ4jJBUhTwzKLsFVTpqR_JsGR3w6ybS3xTDy67WSaY14W4HQf59r69pX0YDaboNDRo_FkMa_T3clNMPA==
267+
org: hk-market-data
268+
bucket: hk-data
269+
----
270+
=== InfluxDB2 Multi Source Runtime
271+
Influx2 Multi Sources Spring Boot Starter will create multiple `InfluxDBClient` bean based on the configuration and register them in the Spring container.
272+
273+
The naming convention for the bean names is: `sourceName` + `className`. Therefore, the usage is as follows:
274+
[source,java]
275+
----
276+
@Autowired
277+
@Qualifier("cnInfluxDBClient")
278+
private InfluxDBClient influxDBClient;
279+
280+
----
281+
215282
== License
216283

217284
Spring Boot is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].

amqp-multi-source-spring-boot-starter/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.childrengreens</groupId>
99
<artifactId>multi-source-spring-boot-starter</artifactId>
10-
<version>2.2</version>
10+
<version>2.3</version>
1111
</parent>
1212

1313
<artifactId>amqp-multi-source-spring-boot-starter</artifactId>
@@ -36,7 +36,7 @@
3636
<dependency>
3737
<groupId>com.childrengreens</groupId>
3838
<artifactId>context-multi-source-spring-boot-starter</artifactId>
39-
<version>2.2</version>
39+
<version>2.3</version>
4040
</dependency>
4141
</dependencies>
4242
</project>

context-multi-source-spring-boot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.childrengreens</groupId>
99
<artifactId>multi-source-spring-boot-starter</artifactId>
10-
<version>2.2</version>
10+
<version>2.3</version>
1111
</parent>
1212

1313
<artifactId>context-multi-source-spring-boot-starter</artifactId>

influx2-multi-source-spring-boot-starter/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.childrengreens</groupId>
99
<artifactId>multi-source-spring-boot-starter</artifactId>
10-
<version>2.2</version>
10+
<version>2.3</version>
1111
</parent>
1212

1313
<artifactId>influx2-multi-source-spring-boot-starter</artifactId>
@@ -43,7 +43,7 @@
4343
<dependency>
4444
<groupId>com.childrengreens</groupId>
4545
<artifactId>context-multi-source-spring-boot-starter</artifactId>
46-
<version>2.2</version>
46+
<version>2.3</version>
4747
</dependency>
4848

4949
</dependencies>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.childrengreens</groupId>
88
<artifactId>multi-source-spring-boot-starter</artifactId>
9-
<version>2.2</version>
9+
<version>2.3</version>
1010
<packaging>pom</packaging>
1111

1212
<name>Spring Boot Starter for Multi Source</name>

redis-multi-source-spring-boot-starter/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.childrengreens</groupId>
99
<artifactId>multi-source-spring-boot-starter</artifactId>
10-
<version>2.2</version>
10+
<version>2.3</version>
1111
</parent>
1212

1313
<artifactId>redis-multi-source-spring-boot-starter</artifactId>
@@ -37,7 +37,7 @@
3737
<dependency>
3838
<groupId>com.childrengreens</groupId>
3939
<artifactId>context-multi-source-spring-boot-starter</artifactId>
40-
<version>2.2</version>
40+
<version>2.3</version>
4141
</dependency>
4242

4343
<dependency>

0 commit comments

Comments
 (0)