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

Spring Data Rest doesn't work with RestController [DATAREST-525]

Open
#899 5 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 31, 2020.

status: feedback-provided type: bug
Dominant language
Java
Stars
958
Forks
568
PR merge metrics
No merged PRs in 30d

Description

Vernon opened DATAREST-525 and commented

My project is built with Spring Data MongoDB and Spring Data Rest. A Restful unit test is fine for one resource/domain object against the RepositoryRestResource. The same unit test, however, fails with the 405 error code when I have a RestController for the same path. The unit fails on the GET method which the Rest controller doesn't handle. The error occurs on Spring Boot 1.2.3, 1.2.4.SNAPSHOT and 1.3.0.SNAPSHOT. Oliver Gierke said that it was likely running into DATAREST-490. Based on the ticket, the Fowler release train should fix the problem. I get the same error after adding the following line to the build.gradle file.

ext['spring-data-releasetrain.version'] = 'Fowler-RELEASE'


Reference URL: http://stackoverflow.com/questions/29639404/a-405-error-when-using-spring-data-rest-restcontroller-at-the-same-time

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.