diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestHandlerMapping.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestHandlerMapping.java index 525b55c24..20e3bfb85 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestHandlerMapping.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestHandlerMapping.java @@ -116,10 +116,12 @@ public class RepositoryRestHandlerMapping extends RequestMappingHandlerMapping { return null; } + uri = StringUtils.hasText(uri) ? uri : "/"; + HttpServletRequest request = new DefaultAcceptTypeHttpServletRequest(origRequest, acceptType, uri); // Root request - if (!StringUtils.hasText(uri) || uri.equals("/")) { + if (uri.equals("/")) { return super.lookupHandlerMethod("/", request); }