use of org.springframework.cloud.stream.schema.client.CachingRegistryClient in project spring-cloud-stream by spring-cloud.
the class SchemaRegistryClientConfiguration method schemaRegistryClient.
@Bean
@ConditionalOnMissingBean
public SchemaRegistryClient schemaRegistryClient() {
DefaultSchemaRegistryClient defaultSchemaRegistryClient = new DefaultSchemaRegistryClient();
if (StringUtils.hasText(schemaRegistryClientProperties.getEndpoint())) {
defaultSchemaRegistryClient.setEndpoint(schemaRegistryClientProperties.getEndpoint());
}
SchemaRegistryClient client = (schemaRegistryClientProperties.isCached()) ? new CachingRegistryClient(defaultSchemaRegistryClient) : defaultSchemaRegistryClient;
return client;
}
Aggregations