spring-projects / spring-projects/spring-hateoas
LinkTo does not resolve Request mapping placeholder
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
Spring framework allows to use placeholder in the request mapping.
@RequestMapping("${people.path:/people}")
interface PersonController {}
Using hateoas 1.1.0 and the linkTo(PersonController.class).toUri() method, the url is resolved as "/people}" with convert to "/people%7D"
Using hateaos 1.4.4 it just throw an error "Illegal character in path at index 30: http://localhost:55407/people}"
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 shown PersonController mapping and linkTo(PersonController.class).toUri() using the reported Spring HATEOAS versions. Trace request-mapping resolution and verify that the default /people path is produced without the trailing brace or URI-encoding error; add a regression test for the placeholder mapping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100