【发布时间】:2020-09-30 20:05:16
【问题描述】:
我需要在我的请求中将参数设置为不需要。
我试过了:
@Get(value = "/list/{username}")
HttpResponse<?> list(String username, @QueryValue(value = "actionCode") String actionCode) {
...
}
当我发送请求时 http://localhost:8080/notification/list/00000000000 抛出以下错误:
{
"message": "Required Parameter [actionCode] not specified",
"path": "/actionCode",
"_links": {
"self": {
"href": "/notification/list/00000000000",
"templated": false
}
}
}
【问题讨论】:
标签: micronaut micronaut-client micronaut-rest