Skip to content

支持服务名称前缀后缀 #67

@carrypann

Description

@carrypann

当多个项目使用同一个注册中心时,可能出现服务名称冲突,如A项目和B项目同时包含名称为repository的服务,如果使用同一个注册中心会出现问题,所以通过添加服务名称前缀后缀来解决。

假设spring.application.name=repository,

  1. 默认情况,服务注册名称以及配置名称都为repository
  2. 配置service.prefix=prefix-,服务注册名称以及配置名称变为prefix-repository
  3. 配置service.suffix=-suffix,服务注册名称以及配置名称变为repository-suffix
  4. 配置service.prefix=prefix- & service.suffix=-suffix,服务注册名称以及配置名称变为prefix-repository-suffix

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions