-
Notifications
You must be signed in to change notification settings - Fork 4
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
Enable the Siren hypermedia without the usage of the internal Spring HATEOAS SPI #47
Comments
Long story short, you only need to implement This should also be easy to test. |
As for "is SIREN wanted", I would use its existence on the classpath as the signal of it being wanted. spring-projects/spring-hateoas#1304, in its original form, was not going to have an enabling signal. We ONLY do that for the provided media types inside Spring HATEOAS because those types are ALWAYS on the classpath. |
@gregturn Thanks for the hints! I need to think a moment about how to handle the (auto-)configuation part. I also don't like to use @component. But using a Therefore introducing an auto-configuration and/or starter jar is maybe the way to go?! 🤔 |
Actually, To prove my point, Spring HATEOAS is consumed by Spring Boot, not the other way around. Spring HATEOAS doesn't have the luxury of using some of Boot's tools and instead leans on lower level stuff. |
Ah, because Nevertheless, adding |
We currently enable the Siren hypermedia type as soon as the library is available on the classpath. But it is the only way until spring-projects/spring-hateoas#1304 is solved.
Related issues:
Check the comments of the mentioned issues as well to understand how to integrate the custom mediatype (how about spring.factories, HypermediaMappingInformation, MediaTypeConfigurationProvider?).
The text was updated successfully, but these errors were encountered: