-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Subclassing RepositoryRestMvcConfiguration or SpringBootRepositoryRestMvcConfiguration causes EndpointWebMvcHypermediaConfiguration to fail with multiple ObjectMapper instances #3439
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
The problem's triggered by the sample's The problem can be avoided by removing the extension of In the longer term, I think we need some changes to Spring Data REST so that the configuration can be customised without having to a extend a class that contains bean definitions. An approach similar to Spring MVC's |
I have the same problem and @wilkinsona 's workaround works for me. I guess the following guide needs to be changed due to this problem if it won't be fixed: |
Is there a workaround to attach a configureValidatingRepositoryEventListener if one cannot subclass a RepositoryRestMvcConfiguration? ie:
(from http://stackoverflow.com/questions/24318405/spring-data-rest-validator) |
I was able to work around this using
|
I've discussed this with @olivergierke and opened DATAREST-621 which he hopes to tackle in time for Gosling RC1. |
Hi all, I'm suffering from the same issue in 1.3.0.M4. I'm subclassing RepositoryRestMvcConfiguration instead of SpringBootRepositoryRestMvcConfiguration. I understand now I shouldn't probably do this, and I'll migrate to the new way of doing things, but having a main application like this already triggers this issue:
|
The suggested workaround is extending |
Sure, I can try that. Is it a drop in replacement? update: Okay, I'm now extending the But if extending the RepositoryRestMvcConfiguration gives such issues, then what's the purpose of allowing to extend it? |
By consequence it is also not possible to override |
@Juchar Correct. If that can't be customised via a |
With 1.3.0.BUILD-SNAPSHOT using https://github.com/spring-cloud-samples/customers-stores
The text was updated successfully, but these errors were encountered: