ssm项目,使用parameterType的包装类时,报错org.springframework.beans.InvalidPropertyException
User类【有Headphoto类】
Headphoto类
UserDao.java
UserDao.xml
报错:
严重: Servlet.service() for servlet [springmvc] in context with path [/WeiQ] threw exception [Request processing failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property ‘headPhoto[flag]’ of bean class [com.wyj.beans.User]: Property referenced in indexed property path ‘headPhoto[flag]’ is neither an array nor a List nor a Map; returned value was [HeadPhoto [id=null, path=null, flag=null]]] with root cause
org.springframework.beans.InvalidPropertyException: Invalid property ‘headPhoto[flag]’ of bean class [com.wyj.beans.User]: Property referenced in indexed property path ‘headPhoto[flag]’ is neither an array nor a List nor a Map; returned value was [HeadPhoto [id=null, path=null, flag=null]]
前端的数据都能传过来,但是一传到dao就报错,好像说是我这个headphoto类找不到,但是在前端传过来时我已经打印出来了,有数据的,求大神指点,一天没有解决