java - 在 SpringBoot 中将列表绑定到模型属性
问题描述
我想将列表绑定到模型中的属性
控制器
@GetMapping("search")
public ResponseEntity<SearchResponseWrapper> fetchSearchResults(SearchCriteria searchCriteria) {
}
模型
public class SearchCriteria {
public List<String> pageSources;
...//some other attribute
...//some other attribute
}
以及将多个值传递给 URL 中的单个参数的正确方法是什么。
解决方案
推荐阅读
- c++ - 根据 const 类成员使用大小初始化 stdarray
- tableau-api - 如何获取维度更改的日期?
- r - As.POSIXct() 为 1970-01-01 之前的日期提供一秒的差异
- json - JQ 错误:尝试映射 IP 和端口时无法遍历字符串
- java - 如何在 HashMap 或 java 中的任何其他方法中存储 key=string、value=arraylist?
- flutter - Flutter:简单的 socket.io 测试 - Websocket 挂起
- reactjs - 从 useState Hook React 渲染项目
- python-3.x - 用于创建 Pdfs 的 python 包
- jboss - Jboss 独立与域模式 - 多节点和远程 jms
- r - 将多个csv读入一个并根据文件名添加一个新列