出錯環境:SSH項目
出錯原因:##.java實體有一個example屬性,類型為int;
對應資料庫中的字段為EX,類型為 int ;
由于該字段是後來添加的,是以之前的資料該字段的值為(null),當去讀取資料是報錯:Null value was assigned to a property of primitive type setter of com.##.##.##
解決方法:将example類型改為 Integer ;
出錯環境:SSH項目
出錯原因:##.java實體有一個example屬性,類型為int;
對應資料庫中的字段為EX,類型為 int ;
由于該字段是後來添加的,是以之前的資料該字段的值為(null),當去讀取資料是報錯:Null value was assigned to a property of primitive type setter of com.##.##.##
解決方法:将example類型改為 Integer ;