使用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]: 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-08-07
猜你喜欢
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-03-09
相关资源
相似解决方案