spring-projects / spring-projects/spring-data-rest

RepositoryRestDispatcherServlet do not have url REST mapping [DATAREST-97]

Open
#481 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.