Skip to content

Support ConfigurationProperties BindHandler advisors #14745

Closed
@philwebb

Description

@philwebb

Spring Cloud Stream have the concept of user supplied default values. The idea is that users may defined per-binder properties, but also "default" properties that should apply to every binder.

For example, the user might define the following:

spring.cloud.stream.default.content-type=text/plain
spring.cloud.stream.bindings.input.content-type=application/json

In this example, spring.cloud.stream.bindings.input.content-type would be application.json because it's explicitly defined and any other name (e.g. spring.cloud.stream.bindings.output.content-type) would be text/plain because the user has defined a default fallback.

Their existing code is quite complicated because it attempts to merge values manually, it also needs to call .bind twice. See EnvironmentEntryInitializingTreeMap and BindingServiceProperties for the existing implementation. What they really need is hooks that would allow them to introduce this concept without needing to do so much work themselves.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions