只需要在hibernate.cfg.xml中添加: <property name="javax.persistence.validation.mode">none</property> 就可以解决以上问题。