加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Java:Spring框架:声明嵌套映射

发布时间:2020-12-15 01:43:13 所属栏目:大数据 来源:网络整理
导读:我在第4行收到错误说: cvc-complex-type.2.4.d:从元素map开始发现无效内容.此时不会有子元素. 有什么建议? 最佳答案 对于复杂值类型,请不要嵌套map元素,而是使用value-ref属性.默认情况下,value元素仅接受String值. The property may be a string,or may

我在第4行收到错误说:
cvc-complex-type.2.4.d:从元素’map’开始发现无效内容.此时不会有子元素.

  

有什么建议?

最佳答案
对于复杂值类型,请不要嵌套map元素,而是使用value-ref属性.默认情况下,value元素仅接受String值.

The property may be a string,or may be converted to the required type using the JavaBeans PropertyEditor machinery. This makes it possible for application developers to write custom PropertyEditor implementations that can convert strings to arbitrary target objects.

Note that this is recommended for simple objects only. Configure more complex objects by populating JavaBean properties with references to other beans.

您的数据将类似于:

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读