spring-cloud-stream-schema客户端;如何轻松设置服务器端口?

时间:2017-02-08 15:08:41

标签: spring-cloud-stream

我认为,每个人都在标题中。 spring-cloud-stream-schema-server port和spring-cloud-stream-schema客户端enpoint是硬编码的。 请参见DefaultSchemaRegistryClient

public class DefaultSchemaRegistryClient implements SchemaRegistryClient {
...
    private String endpoint = "http://localhost:8990";

我还注意到SchemaRegistryClientConfiguration不受条件注释的保护,这样可以很好地在应用程序上下文中进行平滑替换。

是否计划至少可以定制客户端端点?我使用Spring Boot来部署服务器,并且习惯可以自由设置端口,或者至少使用服务注册表。

由于

1 个答案:

答案 0 :(得分:0)

如果在注册表server.port = 9090上 在客户端上使用spring.cloud.stream.schemaRegistryClient.endpoint = localhost:9090

相关问题