Spring 数据 REST - 尽管我提供了自定义实体查找,Spring 仍然调用 fndById

Spring Data REST - Spring still calls fndById despite my providing a custom entity lookup

我有一个与 https://docs.spring.io/spring-data/rest/docs/3.0.8.RELEASE/reference/html/#_customizing_item_resource_uris

中给出的示例几乎相同的用例

我已经注册了一个自定义实体查找并且它运行良好 - 直到用户名不存在;然后它回落到 findById(int),此时它抛出 java.lang.NumberFormatException,因为它试图将 String 转换为 int

有没有办法禁用回退?我不需要也不想通过内部 ID 访问该实体。

这是一个错误。我已经为您归档并修复了 DATAREST-1261