问题描述
我正在使用Springboot 2.2.6。我尝试将控制器的get查询参数绑定到具有嵌套成员的复杂类,例如
data class Test
@ConstructorProperties("name","nested")
constructor(val name: String?,val nested: nested?)
data class nested
@ConstructorProperties("name","name2")
constructor(val name: String,val name2: String)
基本上,属性绑定是有效的,但是对于嵌套数据类而言,我不会得到类似的东西
Invalid property 'nested' of bean class [Test]: Could not instantiate property type [neseted] to auto-grow nested property path; nested exception is java.lang.NoSuchMethodException: neseted.<init>()
有什么想法可以完成这项工作吗?谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)