63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
spring:
|
|
# Application 的配置项
|
|
application:
|
|
name: search-service
|
|
# Profile 的配置项
|
|
profiles:
|
|
active: local
|
|
# Elasticsearch 配置项
|
|
data:
|
|
elasticsearch:
|
|
cluster-name: elasticsearch
|
|
cluster-nodes: localhost:9300
|
|
repositories:
|
|
enable: true
|
|
elasticsearch:
|
|
rest:
|
|
uris: localhost:9200
|
|
|
|
# Dubbo 配置项
|
|
dubbo:
|
|
# Spring Cloud Alibaba Dubbo 专属配置
|
|
cloud:
|
|
subscribed-services: '' # 设置订阅的应用列表,默认为 * 订阅所有应用
|
|
# Dubbo 提供者的协议
|
|
protocol:
|
|
name: dubbo
|
|
port: -1
|
|
# Dubbo 提供服务的扫描基础包
|
|
scan:
|
|
base-packages: cn.iocoder.mall.searchservice.rpc
|
|
# Dubbo 服务提供者的配置
|
|
provider:
|
|
filter: -exception
|
|
validation: true # 开启 Provider 参数校验
|
|
version: 1.0.0 # 服务的版本号
|
|
# Dubbo 服务消费者的配置
|
|
consumer:
|
|
ErrorCodeRpc:
|
|
version: 1.0.0
|
|
ProductCategoryRpc:
|
|
version: 1.0.0
|
|
ProductSpuRpc:
|
|
version: 1.0.0
|
|
ProductSkuRpc:
|
|
version: 1.0.0
|
|
|
|
# RocketMQ 配置项
|
|
rocketmq:
|
|
name-server: localhost:9876
|
|
|
|
# Actuator 监控配置项
|
|
management:
|
|
server.port: 38083 # 独立端口,避免被暴露出去
|
|
endpoints.web.exposure.include: '*' # 暴露所有监控端点
|
|
server.port: ${management.server.port} # 设置使用 Actuator 的服务器端口,因为 RPC 服务不需要 Web 端口
|
|
|
|
# Mall 配置项
|
|
mall:
|
|
# 错误码配置项对应 ErrorCodeProperties 配置类
|
|
error-code:
|
|
group: ${spring.application.name}
|
|
constants-class: cn.iocoder.mall.searchservice.enums.ProductErrorCodeConstants
|