nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property

Project startup error

  nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property [class ***] of primitive type setter of ***

The error content indicates a field of the entity class for the following reasons

Field types are basic types, such as int, long, float, and so on. These types are not allowed to save null values. This field may already exist in the database and has data. You need to directly modify the database field properties and modify or clear all null in the existing data. No error will be reported after restart after modification

Read More: