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
Spring dependency injection for Jackson serializers [SPR-10768] #15394
Comments
Phil Webb commented The lifecycle of How are you usually referring to your serializers? Are you using the |
Cemo Koc commented Exactly.
This is quite similar to javax.validation.Validation integration. |
Juergen Hoeller commented Unfortunately, the Jackson SerializerFactory mechanism is quite convoluted and not really a straightforward SPI for our purposes here, in contrast to Bean Validation's ConstraintValidatorFactory. All, if you have custom SerializerFactory implementations along those lines that work for you, please contribute them. If general enough variants are possible here, we'll consider them for inclusion in Spring proper. Juergen |
Marcel Overdijk commented I'm also hitting this issue as I want to use a I think it would be good to add this capability to Spring. I think the approach to take here is to implement a Spring context aware For example this blog post (http://www.runningasroot.com/blog/2012/05/02/autowiring-jackson-deserializers-in-spring/comment-page-1/) has an example implementation of a SpringBeanHandlerInstantiator. |
Juergen Hoeller commented The abstract So let's give this a try, even applying it by default if it works out... As long as it can be overridden through a user-provided Juergen |
Marcel Overdijk commented Thx |
cemo koc commented Thanks guys. :) |
Cemo Koc opened SPR-10768 and commented
Spring does not has support injecting capabilities for JsonSerializers. This is almost same as Validator part of Spring project. Serializers must be created by Spring and injected necessary parts to inside it.
a sample:
Affects: 3.2.3
Issue Links:
3 votes, 12 watchers
The text was updated successfully, but these errors were encountered: