{"id":221523,"date":"2020-12-04T02:18:33","date_gmt":"2020-12-03T18:18:33","guid":{"rendered":"http:\/\/4563.org\/?p=221523"},"modified":"2020-12-04T02:18:33","modified_gmt":"2020-12-03T18:18:33","slug":"%e5%88%86%e4%ba%ab%e4%b8%80%e4%b8%aa-javabean-%e6%8b%b7%e8%b4%9d%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=221523","title":{"rendered":"\u5206\u4eab\u4e00\u4e2a Javabean \u62f7\u8d1d\u5de5\u5177"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5206\u4eab\u4e00\u4e2a Javabean \u62f7\u8d1d\u5de5\u5177               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u7531\u4e8e\u9879\u76ee\u4e2d\u9700\u8981\u6839\u636e\u6761\u4ef6\u8fd4\u56de PO \u4e2d\u4e0d\u540c\u7684\u5b57\u6bb5\uff0c\u4f46\u53c8\u4e0d\u60f3\u5b9a\u4e49\u591a\u4e2a VO \u7c7b\uff0c\u4e8e\u662f\u6211\u5c31\u4ece\u81ea\u8eab\u9700\u6c42\u51fa\u53d1\uff0c\u5b8c\u6210\u4e86\u4e0b\u9762\u8fd9\u4e2a Javabean \u62f7\u8d1d\u5de5\u5177\u3002<\/p>\n<p>\u4ed3\u5e93\u5730\u5740\u5728\u8fd9\u91cc\uff0c\u5e0c\u671b\u80fd\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u70b9\u70b9\u5fae\u5c0f\u7684\u5e2e\u52a9\uff0c\u4e5f\u5e0c\u671b\u5927\u5bb6\u53ef\u4ee5\u63d0\u63d0\u5efa\u8bae\uff0c\u751a\u81f3\u5e2e\u52a9\u6539\u8fdb\uff0c\u5927\u4f6c\u4eec\u8bf7\u8f7b\u55b7\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>14<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4476447\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : callofmx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/mapstruct.org\/                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476448\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @callofmx \u611f\u8c22\u56de\u590d\uff0c\u5927\u6982\u770b\u4e86\u4e0b\uff0c\u5b83\u8981\u89e3\u51b3\u7684\u95ee\u9898\u5e94\u8be5\u548c\u6211\u662f\u4e00\u81f4\u7684\uff0c\u4e0d\u8fc7\u4e2a\u4eba\u89c9\u5f97\u53ef\u80fd\u6211\u7684\u7528\u6cd5\u4f1a\u66f4\u7b80\u5355\u7075\u6d3b\u4e00\u70b9\uff0c\u7279\u522b\u662f\u5bf9\u5b57\u6bb5\u7684\u6761\u4ef6\u62f7\u8d1d\u8fd9\u65b9\u9762\uff0c\u4e0d\u9700\u8981\u5b9a\u4e49\u989d\u5916\u7684 Mapper \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476449\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tcfenix <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @KeroZhai \u8bb0\u5f97\u4e4b\u524d\u4f7f\u7528\u6700\u5e7f\u7684\u662f cglib \u7684 bean copier, \u6709\u5f88\u591a\u4f7f\u7528\u4e86\u7684\u9879\u76ee,\u65f6\u95f4\u8de8\u5ea6\u90fd\u5f88\u5e7f, \u662f\u7ecf\u5f97\u4f4f\u8003\u9a8c\u5de5\u5177<\/p>\n<p>\u626b\u4e86\u4e00\u4e0b,\u4f60\u7684\u5927\u81f4\u903b\u8f91\u8ddf\u4ed6\u6bd4\u8f83\u63a5\u8fd1,\u90fd\u662f\u53cd\u5c04\u5b9e\u73b0\u52a0\u4e0a\u7f13\u5b58 converter, \u4e0d\u77e5\u9053\u5177\u4f53\u7684\u5b9e\u73b0\u4e0a\u6709\u6ca1\u6709\u5565\u533a\u522b?                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476450\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @tcfenix \u8c22\u8c22\u60a8\u7684\u56de\u590d\uff0cBeancopier \u6211\u4e86\u89e3\u7684\u4e0d\u662f\u5f88\u591a\uff0c\u53ea\u77e5\u9053\u5b83\u7684\u6027\u80fd\u53ef\u5ab2\u7f8e\u76f4\u63a5\u4f7f\u7528 getters\/setters\uff0c\u53e6\u5916\u597d\u50cf\u662f\u6d45\u62f7\u8d1d\uff1f\u56e0\u4e3a\u6211\u7684\u5b9e\u73b0\u4e2d\u57fa\u672c\u7c7b\u578b\u3001Date \u4ee5\u53ca Collection \u90fd\u662f\u76f4\u63a5\u652f\u6301\u7684\uff0c\u5e76\u4e14\u662f\u9012\u5f52\u6df1\u62f7\u8d1d\uff0c\u4e00\u822c\u60c5\u51b5\u4e0b\u662f\u4e0d\u9700\u8981 Converter \u7684\uff0c\u53ea\u6709\u60f3\u5b9e\u73b0\u4e00\u4e9b\u7279\u6b8a\u9700\u6c42\u7684\u65f6\u5019\u53ef\u4ee5\u914d\u7f6e\uff0c\u4f8b\u5982 README \u4e2d\u4e3e\u4f8b\u7684\u65f6\u95f4\u6233\u8f6c Date \u5bf9\u8c61\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476451\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : beitayongguo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             orika \u7528\u7740\u8fd8\u633a\u597d\u7684\uff0c\u4e5f\u662f\u5b57\u8282\u7801\u6846\u67b6\u5b9e\u73b0\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476452\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @beitayongguo \u8c22\u8c22\u63a8\u8350\uff0c\u4e0d\u8fc7\u611f\u89c9\u9700\u8981\u989d\u5916\u914d\u7f6e Mapper \u7684\u8bdd\u7a0d\u5fae\u6709\u70b9\u7e41\u7410\uff0c\u5f53\u7136\u5982\u679c\u8981\u662f\u6bd4\u6027\u80fd\u6211\u8fd9\u4e2a\u5c31\u5b8c\u8d25\u4e86\u2026\u4e0d\u7ba1\u600e\u6837\uff0c\u5e0c\u671b\u80fd\u70b9\u4e2a Star \u652f\u6301\u4e0b\u54c8\u54c8\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476453\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xuanbg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5e8f\u5217\u5316+\u53cd\u5e8f\u5217\u5316\u5c31\u5b8c\u4e86\uff0c\u8981\u4ec0\u4e48\u81ea\u884c\u8f66                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476454\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xuanbg \u662f\uff0c\u4e3b\u8981\u662f\u6709\u6761\u4ef6\u62f7\u8d1d\u4e0d\u540c\u5b57\u6bb5\u7684\u9700\u6c42\uff0c\u800c\u4e14\u4e24\u8fb9\u5b57\u6bb5\u7c7b\u578b\u540d\u79f0\u90fd\u53ef\u80fd\u4e0d\u540c\uff0c\u6bd4\u5982 UserPo -&gt; UserDTO\uff0cUserPO \u5185\u53c8\u6709 List&lt;RolePO&gt;\uff0c\u800c UserDTO \u5185\u5bf9\u5e94\u7684\u662f List&lt;RoleDTO&gt; \u8fd9\u6837\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476455\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : paragon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5176\u5b9e spring beanutils \u8db3\u591f\u5e94\u4ed8\u5927\u591a\u6570\u8fd9\u79cd\u573a\u666f\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476456\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xuanbg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @KeroZhai \u90a3\u4e48\u5b57\u6bb5\u600e\u4e48\u5bf9\u5e94\u5462\uff1f\u641e\u4e2a map \u4f20\u8fdb\u53bb\u4e48\uff1f\u6709\u5199\u8fd9\u4e2a map \u7684\u7f8e\u56fd\u529f\u592b\uff0c\u6211 new \u4e00\u4e2a\u76ee\u6807\u5bf9\u8c61\u51fa\u6765\u624b\u52a8 set \u4e00\u4e0b\u5c31\u5b8c\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476457\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xuanbg \u9ed8\u8ba4\u6839\u636e\u5b57\u6bb5\u540d\u6765\u5bf9\u5e94\u7684\uff0c\u4e00\u822c\u4f7f\u7528\u4e0a\u4e0d\u9700\u8981\u914d\u7f6e\u5565\uff0c\u53ea\u662f\u9700\u8981\u58f0\u660e\u4e00\u4e9b\u6761\u4ef6\uff0c\u5e76\u5728\u62f7\u8d1d\u65f6\u6307\u5b9a\u8fd9\u4e9b\u6761\u4ef6\uff0c\u6765\u51b3\u5b9a\u8fd9\u6b21\u62f7\u8d1d\u8981\u5ffd\u7565\u54ea\u4e9b\u5b57\u6bb5\u6216\u662f\u91c7\u53d6\u54ea\u79cd\u7b56\u7565\u6765\u5ffd\u7565\u5b83\u4eec\u3002\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f JPA \u7684\u8bdd\uff0c\u5e94\u8be5\u77e5\u9053\u5173\u8054\u5173\u7cfb\u53ef\u80fd\u5d4c\u5957\u597d\u51e0\u5c42\uff0c\u7279\u522b\u662f\u5173\u8054\u96c6\u5408\uff0c\u5982\u679c\u5168\u90e8\u624b\u52a8 set \u53ef\u80fd\u4e0d\u592a\u73b0\u5b9e\u3002\u5f53\u7136\u5982\u679c\u6ca1\u6709\u8fd9\u4e2a\u9700\u8981\u7684\u8bdd\uff0c\u786e\u5b9e\u4ef7\u503c\u610f\u4e49\u4e0d\u5927\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476458\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @paragon \u4e0d\u8fc7\u5b83\u4e5f\u662f\u6d45\u62f7\u8d1d\u5427\uff0c\u50cf\u662f\u5173\u8054\u67e5\u8be2\u51fa\u6765\u201c\u7528\u6237-\u89d2\u8272-\u6743\u9650\u201d\u4e09\u79cd\u5b9e\u4f53\u7c7b\uff0c\u518d\u8f6c\u4e3a VO \u7684\u65f6\u5019\u5e94\u8be5\u5c31\u6ca1\u529e\u6cd5\u4e86\u3002\u4e0d\u8fc7\u5176\u5b9e\u4e2a\u4eba\u89c9\u5f97\u6211\u8fd9\u4e2a\u91cd\u70b9\u4e0d\u662f\u9012\u5f52\u6df1\u62f7\u8d1d\uff0c\u4e3b\u8981\u662f\u6309\u6761\u4ef6\u62f7\u8d1d\u4ee5\u53ca\u6307\u5b9a\u5982\u4f55\u5ffd\u7565 null \u548c\u7a7a\u503c\u4e24\u4e2a\u529f\u80fd\u6bd4\u8f83\u65b9\u4fbf\uff0c\u5bf9\u6211\u6765\u8bf4\u5f88\u6709\u7528&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476459\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : syozzz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             dozer?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4476460\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KeroZhai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @syozzz \u611f\u8c22\u56de\u590d\uff0c\u8bf4\u5b9e\u8bdd\u4e00\u4e0b\u5b50\u77e5\u9053\u4e86\u597d\u591a\u62f7\u8d1d\u5de5\u5177\u2026\u4e86\u89e3\u4e86\u4e00\u4e0b\u786e\u5b9e\u633a\u5f3a\u5927\u7684\uff0c\u4e0d\u8fc7\u6b63\u5982\u6211\u524d\u9762\u63d0\u5230\u7684\uff0c\u6211\u89c9\u5f97\u4f7f\u7528 XML \u53bb\u914d\u7f6e\u6620\u5c04\u6709\u70b9\u9ebb\u70e6\uff0c\u66f4\u503e\u5411\u4e8e\u4f7f\u7528\u6ce8\u89e3\u3002\u8fd8\u6709\u5c31\u662f\u5e0c\u671b\u80fd\u5c3d\u91cf\u590d\u7528\u4e00\u4e2a\u7c7b\uff0c\u6839\u636e\u4e00\u5b9a\u7684\u6761\u4ef6\u9009\u62e9\u8981\u62f7\u8d1d\u54ea\u4e9b\u5b57\u6bb5\uff0c\u8fd9\u4e2a\u53ef\u80fd\u662f\u5bf9\u6211\u6765\u8bf4\u8fd9\u4e2a\u5de5\u5177\u6700\u4e3b\u8981\u60f3\u89e3\u51b3\u7684\u95ee\u9898\u5427\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5206\u4eab\u4e00\u4e2a Javabean \u62f7\u8d1d\u5de5&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\/221523"}],"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=221523"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/221523\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221523"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}