@GetMapping("/test")
public Object test(@RequestParam(value = "str") String[] arr){..}
接口请求的时候有3种方式:
方式1:
test?str=12&str=13
方式2:
test?str=[12,13]
推荐方式一访问,方式二在 SpringBoot 2.0 以上会报 400 ,需要改配置,可以参考 springboot的get请求传入特殊符号报400错误(RFC 7230 and RFC 3986),或者使用方式3
方式3:
test?str=12,13



