Skip to content

Implemented property resolving in HATEOAS links. #1328

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
wants to merge 1 commit into from

Conversation

lyca
Copy link
Contributor

@lyca lyca commented Jul 27, 2020

#361 Added the resolving of properties by using org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext().getEnvironment() for obtaining an Environment statically. This works here because the code runs in the context of a web application.
The only breaking change I see is, that testing is only possible if the ContextLoader is initialized otherwise there will be a NPE.
I am unsure, if this use case needs additional effort.

@pivotal-issuemaster
Copy link

@lyca Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@lyca Thank you for signing the Contributor License Agreement!

@odrotbohm odrotbohm self-assigned this Jul 27, 2020
odrotbohm pushed a commit that referenced this pull request Jul 27, 2020
We now pipe the detected mapping through the PropertyResolver exposed by the ApplicationContext's Environment.

Original pull request: #1328.
odrotbohm added a commit that referenced this pull request Jul 27, 2020
Made implementation class package protected to not expose it. Avoid the use of Optional for hot code paths. Removed factory method as we only use the type internally anyway.

Removed test customizations as the discoverer is now just leniently opting out if not ApplicationContext can be found.

Original pull request: #1328.
@odrotbohm
Copy link
Member

That's polished and merged. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants