我在为以下Json字符串创建适当的RequestParams时遇到问题:
{
"input": [
{
"personAdres": {
"plaats": "Amsterdam",
"straat": "Grietenstraat",
"huisnummer": "12",
"postcode": "4512UN""
},
"interesses": [
"gas_station",
"soccer"
]
},
{
"personAdres": {
"plaats": "Arnhem",
"straat": "Koningsweg",
"huisnummer": "3",
"postcode": "1953AA"
},
"interesses": [
"gas_station",
"soccer"
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
我尝试了以下方法:
@RequestMapping(method = RequestMethod.GET, params = {"input", "personAdres", "plaats", "straat", "huisnummer", "postcode", "interesses"})
public
@ResponseBody`enter code here`
String getMovie(
@RequestParam(value = "input") String[] input,
@RequestParam(value = "personAdres") String[] personAdres,
@RequestParam(value = "plaats") String plaats,
@RequestParam(value = "straat") String …Run Code Online (Sandbox Code Playgroud)