diff --git a/search/pom.xml b/search/pom.xml
index 31c62ad3c..250fc31c5 100644
--- a/search/pom.xml
+++ b/search/pom.xml
@@ -16,4 +16,17 @@
search-service-api
search-service-impl
+
+
+
+
+ cn.iocoder.mall
+ common-dependencies
+ 1.0-SNAPSHOT
+ pom
+ import
+
+
+
+
diff --git a/search/search-service-impl/pom.xml b/search/search-service-impl/pom.xml
index c428d048f..a5ef51c25 100644
--- a/search/search-service-impl/pom.xml
+++ b/search/search-service-impl/pom.xml
@@ -42,22 +42,14 @@
- org.apache.dubbo
- dubbo
-
-
- org.apache.dubbo
- dubbo-spring-boot-starter
+ com.alibaba.cloud
+ spring-cloud-starter-dubbo
- org.apache.curator
- curator-framework
-
-
- org.apache.curator
- curator-recipes
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
@@ -78,10 +70,6 @@
spring-boot-starter-test
test
-
- org.apache.curator
- curator-framework
-
org.springframework.boot
spring-boot-starter-web
diff --git a/search/search-service-impl/src/main/resources/config/application.yaml b/search/search-service-impl/src/main/resources/config/application.yaml
index e58d6f5fe..c00f9525e 100644
--- a/search/search-service-impl/src/main/resources/config/application.yaml
+++ b/search/search-service-impl/src/main/resources/config/application.yaml
@@ -7,17 +7,29 @@ spring:
repositories:
enable: true
-# dubbo
+ # Spring Cloud 配置项
+ cloud:
+ nacos:
+ # Spring Cloud Nacos Discovery 配置项
+ discovery:
+ server-addr: 127.0.0.1:8848 # Nacos 服务器地址
+
+# Dubbo 配置项
dubbo:
- application:
- name: search-service
+ # Dubbo 注册中心
registry:
- address: zookeeper://127.0.0.1:2181
+ address: spring-cloud://127.0.0.1:8848 # 指定 Dubbo 服务注册中心的地址
+ # Spring Cloud Alibaba Dubbo 专属配置
+ cloud:
+ subscribed-services: admin-application, order-application, product-application # 设置订阅的应用列表,默认为 * 订阅所有应用
+ # Dubbo 提供者的协议
protocol:
- port: -1
name: dubbo
+ port: -1
+ # Dubbo 提供服务的扫描基础包
scan:
base-packages: cn.iocoder.mall.search.biz.service
+ # Dubbo 服务提供者的配置
provider:
filter: -exception
ProductSearchService: