我正在使用Kathatrsis作为我的REST API。我也是JSONApi规范的新手。我为我的生活找不到调用@JsonApiFindAllWithIds
方法的url模式。
例如,假设它注释为:
@JsonApiFindAllWithIds
public Iterable<ThriftType> findAll(Iterable<String> iterable, QueryParams queryParams) {
如果我调用URL(我的资源称为测试):
http://localhost:8080/test/1?filter[test][otherId][EQ]=9
我希望它能够使用包含1
的可迭代列表和包含我的过滤器的查询参数对象来触及该方法。
但是,它将我的@JsonApiFindOne
方法称为:
@JsonApiFindOne
public ThriftType findOne(String id) {
您能告诉我使用@JsonApiFindAllWithIds
方法的正确网址格式吗?
答案 0 :(得分:0)
JsonAliFindAllWithIds适用于需要获取值的多个id的场景。 例如
http://localhost:8080/test/1,2
调用findallwithids方法,同时提供单个方法 我会称之为findone方法。 希望它有所帮助