Written on
·
555
0
에러 코드는 다음과 같습니다.
Field error in object 'item' on field 'price': rejected value [1111a]; codes [typeMismatch.item.price,typeMismatch.price,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [item.price,price]; arguments []; default message [price]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'price'; nested exception is java.lang.NumberFormatException: For input string: "1111a"]]
가격을 1000원 이하 또는 100만원 이상 등으로 type에러가 없는 경우에는 정상적으로 validation이 작동하는데 타입이 다른 경우에만 이렇게 에러가 발생합니다.