JAVA/Spring(eGovFrame)
화면에서 배열로 256개 이상의 Data 전송 시 IndexOutOfBoundsException오류 해결 방법
최강깜시
2018. 3. 28. 11:14
스프링 동적리스트 바인딩의 경우 최대 256개까지가 기본설정으로 되어 있다.
만약, 256개 이상을 파라미터로 넘기게 된다면 IndexOutOfBoundsException이 발생하게 될 것이다.
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setAutoGrowCollectionLimit(1024);
}
위와 같이 Controller에 추가를 하여 해결하면 된다.
다른 방법으로 톰캣의 경우 설정하는 법도 있곤 한데.. 그냥 이걸로...ㅋ