{"id":94396,"date":"2020-05-03T05:52:30","date_gmt":"2020-05-02T21:52:30","guid":{"rendered":"http:\/\/4563.org\/?p=94396"},"modified":"2020-05-03T05:52:30","modified_gmt":"2020-05-02T21:52:30","slug":"springmvcr-%e7%9a%84-modelattribute-%e6%b3%a8%e8%a7%a3%e6%80%8e%e4%b9%88%e7%bb%91%e5%ae%9a-list","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=94396","title":{"rendered":"springmvcr \u7684 ModelAttribute \u6ce8\u89e3\u600e\u4e48\u7ed1\u5b9a list"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  springmvcr \u7684 ModelAttribute \u6ce8\u89e3\u600e\u4e48\u7ed1\u5b9a list               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : muziling <\/span>  <span><i><\/i> 25<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>controller \u91cc public Result<retmsg> saveOrUpdate(@ModelAttribute ArrayList<testmodel> test) @ModelAttribute \u8981\u600e\u4e48\u7ed1\u5b9a list\uff0c \u6211\u8bd5\u4e86\u62a5\u9519\uff0c\u63d0\u793a\u65e0\u6cd5\u628a string \u8f6c TestModel<\/testmodel><\/retmsg><\/p>\n<p>\u524d\u7aef\u63d0\u4ea4\u7684\u7f16\u7801\u662f Content-Type: application\/x-www-form-urlencoded<\/p>\n<p>\u6709\u6ca1\u6709\u4f8b\u5b50\uff0c\u641c\u7d22\u4e86\u4e00\u5708\uff0c\u6ca1\u627e\u5230<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>2<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1206659\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : putaozhenhaochi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u524d\u53f0\u4f20 json \u6570\u7ec4\uff0c\u540e\u53f0\u76f4\u63a5 @RequestBody List&lt;XXX&gt; list \u63a5\u6536                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1206660\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : muziling <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @putaozhenhaochi \u641e\u5b9a\u4e86\uff0c\u4f20 jsonarray \u4e0d\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>springmvcr \u7684 Mode&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/94396"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=94396"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/94396\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=94396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=94396"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=94396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}