spring-projects / spring-projects/spring-data-rest
Temporary root mapping "/" issue after startup [DATAREST-98]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Michael Wilmes opened DATAREST-98 and commented
After startup of application Spring Data Rest root ("/") controller mapping is failing:
1. curl "http://admin:admin@localhost:8080/api/"
{
"cause" : null,
"message" : "No mapping found on controller class org.springframework.data.rest.webmvc.RepositoryController!"
}
If I now access an SDR entity controller...
curl "http://admin:admin@localhost:8080/api/businessRule"
{
"links" : [ {
"rel" : "businessRule.search",
"href" : "http://localhost:8080/api/businessRule/search"
} ],
"content" : [ ],
"page" : {
"size" : 0,
"totalElements" : 0,
"totalPages" : 0,
"number" : 1
}
}
...the "/" controller mapping that failed on first access works again magically:
url "http://admin:admin@localhost:8080/api/"
{
"links" : [ {
"rel" : "bcs",
"href" : "http://localhost:8080/api/businessRule"
}, {
"rel" : "build",
"href" : "http://localhost:8080/api/customer"
} ],
"content" : [ ]
}
Affects: 1.1.0.M1
Contributor guide
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
Start by reproducing the startup sequence against the root endpoint at /api/, then access /api/businessRule and retry the root endpoint. Read the RepositoryController mapping behavior around startup and entity-controller access; done means the root mapping works on the first request as well as after an entity request.
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
- Needs clarification
- Newbie friendliness
- 35/100