Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding construction of ValueInjectors, to support better access to configuration, overrides #2125

Open
cowtowncoder opened this issue Aug 31, 2018 · 0 comments

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Aug 31, 2018

(see #/1835 for background)

Currently ability to "inject" values (usually per-call contextual values, either for accessing other information (lookups), or for simple substitution from attributes) is severely limited: you can indicate that value for a property should be injectable (see AnnotationIntrospector method findInjectableValue()), but after that, handling is limited by ValueInjector implementation that delegates lookups through DeserializationContext.findInjectableValue(). This works for many cases, but not all, nor does it lend itself to customizations.

As per #1835 there are cases where overload of BeanDeserializerFactory.addInjectable() is used to customize handling. It seems better to allow registering a factory/handler (or, add a new method in one of existing ones, if any applicable?), since that would then become public API, supported and less fragile.

I'll tentatively mark this as 2.10 feature, although it is possible this might end up in 3.x list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant