spring-projects / spring-projects/spring-hateoas
@Value from application.properties part of @RequestMapping
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
Hi team,
Very interesting case I got.
I have property from application properties as part of my Parent Controller, like:
@RequestMapping(value="${api.version}/api")
api.version=v1
And children controller
@RequestMapping(value="/messages")
So constructing hateoas link I expect "/v1/api/messages"
But I got "/${api.version}/api/messages"
Raise a question in here as well
https://stackoverflow.com/questions/54447988/autowired-variables-inside-hateoas-links
Please suggest elegant fix apart from parsing manually.
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the Parent Controller, child controller, application.properties entry, and HATEOAS link construction shown in the report. Start by tracing how the @RequestMapping value is read when the link is generated. Done means the generated link uses /v1/api/messages rather than retaining the ${api.version} placeholder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100