2016-09-28 23 views
0

我正在使用Kathatrsis作为我的REST API。我也是JSONApi规范的新手。我为我的生活不能找出url模式来调用@JsonApiFindAllWithIds方法。调用Katharsis JSONApi JsonApiFindAllWithIds

例如,假设它被注释为:

@JsonApiFindAllWithIds 
public Iterable<ThriftType> findAll(Iterable<String> iterable, QueryParams queryParams) { 

如果我所说的网址(我的资源被称为测试):

http://localhost:8080/test/1?filter[test][otherId][EQ]=9 

我希望它打的方法,包含1的迭代列表和包含我的过滤器的查询参数对象。

然而,叫我@JsonApiFindOne方法描述为:

@JsonApiFindOne 
public ThriftType findOne(String id) { 

你能告诉我正确的URL格式来打我@JsonApiFindAllWithIds方法?

回答

0

JsonAliFindAllWithIds用于存在多个需要获取值的id的情况。 对于如

http://localhost:8080/test/1,2

能打电话findallwithids方法,而提供单 标识会打电话findone方法。 希望它有帮助