org.springframework.cloud.stream.config.BindingHandlerAdvise.MappingsProvider Java Examples
The following examples show how to use
org.springframework.cloud.stream.config.BindingHandlerAdvise.MappingsProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExtendedBindingHandlerMappingsProviderConfiguration.java From spring-cloud-stream-binder-kafka with Apache License 2.0 | 5 votes |
@Bean public MappingsProvider kafkaExtendedPropertiesDefaultMappingsProvider() { return () -> { Map<ConfigurationPropertyName, ConfigurationPropertyName> mappings = new HashMap<>(); mappings.put( ConfigurationPropertyName.of("spring.cloud.stream.kafka.bindings"), ConfigurationPropertyName.of("spring.cloud.stream.kafka.default")); mappings.put( ConfigurationPropertyName.of("spring.cloud.stream.kafka.streams"), ConfigurationPropertyName .of("spring.cloud.stream.kafka.streams.default")); return mappings; }; }
Example #2
Source File: ExtendedBindingHandlerMappingsProviderConfiguration.java From spring-cloud-stream-binder-rabbit with Apache License 2.0 | 5 votes |
@Bean public MappingsProvider rabbitExtendedPropertiesDefaultMappingsProvider() { return () -> { Map<ConfigurationPropertyName, ConfigurationPropertyName> mappings = new HashMap<>(); mappings.put( ConfigurationPropertyName.of("spring.cloud.stream.rabbit.bindings"), ConfigurationPropertyName.of("spring.cloud.stream.rabbit.default")); return mappings; }; }
Example #3
Source File: BindingServiceConfiguration.java From spring-cloud-stream with Apache License 2.0 | 5 votes |
@Bean public BindingHandlerAdvise BindingHandlerAdvise( @Nullable MappingsProvider[] providers) { Map<ConfigurationPropertyName, ConfigurationPropertyName> additionalMappings = new HashMap<>(); if (!ObjectUtils.isEmpty(providers)) { for (int i = 0; i < providers.length; i++) { MappingsProvider mappingsProvider = providers[i]; additionalMappings.putAll(mappingsProvider.getDefaultMappings()); } } return new BindingHandlerAdvise(additionalMappings); }
Example #4
Source File: PubSubBinderConfiguration.java From spring-cloud-gcp with Apache License 2.0 | 4 votes |
@Bean public MappingsProvider pubSubExtendedPropertiesDefaultMappingsProvider() { return () -> Collections.singletonMap( ConfigurationPropertyName.of("spring.cloud.stream.gcp.pubsub.bindings"), ConfigurationPropertyName.of("spring.cloud.stream.gcp.pubsub.default")); }