【发布时间】:2019-02-24 11:31:17
【问题描述】:
我需要在 Spring boot 中将 Long 对象列表从 Angular 发送到 Rest 控制器:
@PostMapping("/accept-friends")
public ResponseEntity<Void> acceptFriendRequests(@RequestBody List<Long> friendRequestsIds)
这可能吗?
【问题讨论】:
-
您想使用 GET 或 POST/PUT 方法吗?
-
发表抱歉,忘记添加
-
创建一个新 bean 并向该 bean 添加一个列表字段并映射该 bean
-
看看this
标签: java spring rest spring-boot