From 1d8919ac6dbd667b4e840702b83c7111b2b0ac50 Mon Sep 17 00:00:00 2001 From: xpc1024 Date: Sun, 21 Jan 2024 19:21:39 +0800 Subject: [PATCH] =?UTF-8?q?v2.0.0-beta5=20=E5=A4=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6=E5=8F=8A=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../easyes/test/mapper/DocumentMapper.java | 2 ++ .../src/test/resources/application.yml | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/easy-es-test/src/main/java/org/dromara/easyes/test/mapper/DocumentMapper.java b/easy-es-test/src/main/java/org/dromara/easyes/test/mapper/DocumentMapper.java index c078d214..8f4ff104 100644 --- a/easy-es-test/src/main/java/org/dromara/easyes/test/mapper/DocumentMapper.java +++ b/easy-es-test/src/main/java/org/dromara/easyes/test/mapper/DocumentMapper.java @@ -1,5 +1,6 @@ package org.dromara.easyes.test.mapper; +import org.dromara.easyes.annotation.EsDS; import org.dromara.easyes.core.core.BaseEsMapper; import org.dromara.easyes.test.entity.Document; @@ -8,5 +9,6 @@ import org.dromara.easyes.test.entity.Document; *

* Copyright © 2021 xpc1024 All Rights Reserved **/ +@EsDS("ds1") public interface DocumentMapper extends BaseEsMapper { } diff --git a/easy-es-test/src/test/resources/application.yml b/easy-es-test/src/test/resources/application.yml index 04c0219f..ef73ee9b 100644 --- a/easy-es-test/src/test/resources/application.yml +++ b/easy-es-test/src/test/resources/application.yml @@ -1,9 +1,9 @@ easy-es: -# enable: true - address: 10.20.64.228:9200 - schema: http -# username: elastic -# password: WG7WVmuNMtM4GwNYkyWH + # enable: true + # address: 10.20.64.228:9200 + # schema: http + # username: elastic + # password: WG7WVmuNMtM4GwNYkyWH keep-alive-millis: 18000 global-config: i-kun-mode: true @@ -17,6 +17,14 @@ easy-es: field-strategy: not_empty refresh-policy: immediate enable-track-total-hits: true + dynamic: + datasource: + ds1: + address: 10.20.64.228:9200 + ds2: + address: 49.234.28.111:9200 + #username: '若无可去掉此行' + #password: '若无可去掉此行' #logging: # level: # tracer: trace \ No newline at end of file