進行項目開發時拋出如下異常:
javax.servlet.ServletException: IllegalArgumentException occurred while calling setter of com.lab.domain.LabRoom.device; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.lab.domain.LabRoom.device
這裏的原因是我把device設置成了數組形式,而數組是不允許爲null的所以就會拋出異常,而改成了Set<Device>之後就沒有異常了。