【发布时间】:2020-09-25 13:34:07
【问题描述】:
请求 A:http://localhost:8080/api/organizations/1/scenarios?perProducts=1,
请求 B:http://localhost:8080/api/organizations/1/scenarios?perProducts=1,2
我的位置类:
@Location("/scenarios")
data class Scenarios(
val organization: Organization,
val startValue: Int = 0,
val perPage: Int = 10,
val perProducts: List<Int> = listOf(),
val byName: String = ""
)
如果我向路径(请求 a)添加一个产品 ID,一切正常,但如果我添加两个(请求 b)或更多 ID,我会收到“错误请求”作为响应。我哪里错了?
【问题讨论】: