使用springmvc时报错
org.springframework.beans.NullValueInNestedPathException: Invalid property 'department' of bean class [com.atguigu.springmvc.crud.entities.Employee]:Could not instantiate property type [com.atguigu.springmvc.crud.entities.Department] to auto-grow nested property path: java.lang.InstantiationException: com.atguigu.springmvc.crud.entities.Departmentorg.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
这是因为类xxx中没有无参构造方法。因为这个原因它还会报错
org.springframework.beans.NullValueInNestedPathException: Invalid property 'department' of bean class [com.atguigu.springmvc.crud.entities.Employee]: