Spring form-url-encoded 방식의 파라미터에 배열이 대괄호로 표기될때 NPE 발생 해결법
실무중에 클라이언트에서 request를 form-url-encoded 방식으로 보내는데 그중에 배열의 표기가 [ ] 를 사용할때 매핑에러가 났었다 list[]=1&list[]=2 이런식으로 배열을 url 방식으로 표기할때 명확한 표준이 없는 것 같다. list=1&list=2도 가능하다 @RestController class TestController { @PostMapping("/url-encode") fun urlEncode(body: TestBody): String { println(body) return "ok" } @PostMapping("/json") fun json(@RequestBody body: TestBody): String { println(body) return "ok" } } da..