-
Notifications
You must be signed in to change notification settings - Fork 471
How to configure MappingJackson2HttpMessageConverter registered by spring-hateoas? #262
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
Comments
Not an easy one, because it's a container of static inner classes. Easier to fork spring-hateoas project and apply your changes locally. |
@ceefour you should be able to access/ autowire the "_halObjectMapper" bean (don't remember for sure but I believe that's the qualifier name) in your spring configuration. Then the customizations are straight forward. |
Thanks! Although that feels hacky or internals to me... Actually the common use case would be to register additional modules such as |
In my experience, when you need to customize converters and modules it is also necessary to get their order right, and sooner or later you need full control. This is possible using WebMvcConfigurationSupport.configureMessageConverters (xml does not give you the same level of control, at least not in older versions of Spring). By letting your @configuration class extend WebMvcConfigurationSupport you effectively do the same as writing @EnableWebMvc, but you get more control.
|
Superceded by #833. |
I'm sorry for misusing the issues as a forum, however there's already this question at StackOverflow http://stackoverflow.com/questions/24694493/how-to-configure-mappingjackson2httpmessageconverter-registered-by-spring-hateoa 3 months old and no solution.
The text was updated successfully, but these errors were encountered: