server2022. 11. 10. 16:15

[springboot]Can not set int field to null value 해결방법

 

VO 로 db 설정할 때, Int형 데이터를 추가 할 일이 생겼다..

 

추가 한 후, list불렀더니, 

 

Can not set int field to null value

 

int형 data가 Null되어있기 때문에 오류가 나온다..

 

해결하기 위해서는 

 

int aaaa;

 

-> Integer aaaa; 로 변경해서 다시 빌드하면 리스트가 0으로 초기화되서 나온다.

Posted by thdeodls85