spring-projects / spring-projects/spring-data-rest
RepositoryRestDispatcherServlet do not have url REST mapping [DATAREST-97]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Ilan Meyrowitsch opened DATAREST-97 and commented
I have spent many hours to understand why org.springframework.data.rest.webmvc.RepositoryRestDispatcherServlet is not working for me in spring-data-rest-webmvc-1.1.0.BUILD.jar. There are no errors in the log but the repository is not working. The browser returns 404 errors.
I compared the behavior to org.springframework.data.rest.webmvc.RepositoryRestExporterServlet in spring-data-rest-webmvc-1.0.0.BUILD.jar
In the previous version with RepositoryRestExporterServlet the look up is done by o.s.data.rest.webmvc.RepositoryRestHandlerMapping and there for the browser get the REST response.
But at the same point in the scenario RepositoryRestDispatcherServlet is using o.s.w.s.mvc.method.annotation.RequestMappingHandlerMapping for the look up e.g “Looking up handler method for path /user/search/findByQueryValue”. There after the log says RequestMappingHandlerMapping - Did not find handler method for.
I think that RepositoryRestDispatcherServlet should activate data.rest.webmvc.RepositoryRestHandlerMapping. But this is inside your code. For your decisions. I hope the comparison make sense. For me it is important to use the 1.1 version. I would appreciate a solution or some guide lines
Affects: 1.1.0.M1
Reference URL: https://github.com/SpringSource/spring-data-rest/issues/85#issuecomment-17618228
2 votes, 2 watchers
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 comparing RepositoryRestDispatcherServlet with the earlier RepositoryRestExporterServlet and trace how RepositoryRestHandlerMapping is configured versus RequestMappingHandlerMapping. Reproduce the lookup for /user/search/findByQueryValue in spring-data-rest-webmvc-1.1.0.BUILD.jar. Done means the repository REST endpoint resolves instead of returning a 404.
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
- 25/100