1

我有以下代码来存储评论库,并通过它们所归属的帖子的 ID 找到它们:

@RepositoryRestResource(path = "/comments")
public interface CommentsRestRepository extends MongoRepository<Comment, String> {
    Page<Comment> findByPostID(@Param("postID") String postID, Pageable pageable);
}

使用 URLhttp://localhost:8080/comments/search/findByPostID?postID=55ff128577c8dc3d6b311da7时,它可以工作。但是,如果我添加&page=1&size=5页面/大小/排序或任何其他组合,它会完全忽略这些参数。为什么是这样?

4

1 回答 1

0

我正在使用 curl,您必须在 URL 周围使用引号才能评估整个表达式!

于 2015-10-22T11:50:34.057 回答