Skip to content

Make sure that EntityLinks bean is only activated for Spring MVC #1021

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

Closed
gregturn opened this issue Jul 17, 2019 · 2 comments
Closed

Make sure that EntityLinks bean is only activated for Spring MVC #1021

gregturn opened this issue Jul 17, 2019 · 2 comments
Assignees
Milestone

Comments

@gregturn
Copy link
Contributor

Related issue: spring-projects/spring-boot#16020

@gregturn
Copy link
Contributor Author

Current MVC-based EntityLink beans are created by Boot even when autoconfiguring a WebFlux app.

These beans should only be created when an MVC app is being fashioned.

@odrotbohm odrotbohm assigned odrotbohm and unassigned gregturn Jul 17, 2019
@odrotbohm odrotbohm changed the title Make WebMVC-specific EntityLink beans conditional Make sure that EntityLinks bean is only activated for Spring MVC Jul 17, 2019
odrotbohm added a commit that referenced this issue Jul 17, 2019
…n Spring WebMVC.

We now clearly separate the beans registered by configuration backing @EnableEntityLinks into the ones that depend on Spring MVC being used and commonly shared ones. Tweaked the setup of @EnableHypermediaSupport to rather include the individual configuration classes instead of using @EnableEntityLinks directly as that would always pull WebMVC specific components.
@gregturn gregturn reopened this Jul 23, 2019
@gregturn
Copy link
Contributor Author

Looks like there is a still a hard dependency on a bean being created named webMvcEntityLinks:

https://github.com/spring-projects/spring-hateoas/blob/master/src/main/java/org/springframework/hateoas/config/EntityLinksConfiguration.java#L46-L51

Might be able to drop the @DependsOn annotation.

odrotbohm added a commit that referenced this issue Jul 31, 2019
@odrotbohm odrotbohm added this to the 1.0 RC1 milestone Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants