gpt4 book ai didi

java - Spring 3 中字符串数组的问题

转载 作者:行者123 更新时间:2023-11-29 05:58:55 25 4
gpt4 key购买 nike

我正在尝试从客户端向 Spring 3 发送一个 String[]。在 Controller 端,我已经定义了这样的方法。

@RequestMapping(value = "somemethod", method = RequestMethod.POST)
public ModelAndView exportSomething(@RequestParam("sentences") String[] sentences) {
//.. logic
}

我发送的数据是这样的

sentences: ["a","b,c","d"] 

问题出在服务器端,句子数组的大小是 4。它将 b 和 c 拆分为两个不同的词。

这是 Spring 的问题还是我需要更改传递数据的方式?

最佳答案

我猜这是 Spring 框架的已知问题。参见 https://jira.springsource.org/browse/SPR-7963

关于java - Spring 3 中字符串数组的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10930824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com