{"id":431,"date":"2017-08-02T15:04:18","date_gmt":"2017-08-02T15:04:18","guid":{"rendered":"http:\/\/happily70.dothome.co.kr\/?p=431"},"modified":"2017-08-02T15:05:03","modified_gmt":"2017-08-02T15:05:03","slug":"%ec%bb%a8%ed%8a%b8%eb%a1%a4%eb%9f%ac-%ea%b5%ac%ed%98%84","status":"publish","type":"post","link":"http:\/\/happily70.dothome.co.kr\/?p=431","title":{"rendered":"\ucee8\ud2b8\ub864\ub7ec \uad6c\ud604"},"content":{"rendered":"<p>\ucee8\ud2b8\ub864\ub7ec\ub97c \uad6c\ud604\ud55c\ub2e4\ub294 \uac83\uc740 \ud074\ub77c\uc774\uc5b8\ud2b8\uc758 \uc694\uccad\uc744 \ucc98\ub9ac\ud560 \uba54\uc18c\ub4dc\ub97c \uad6c\ud604\ud55c\ub2e4\ub294 \uac83\uc744 \ub73b\ud55c\ub2e4.<\/p>\n<p>\uacfc\uc815\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<br \/>\n1. @Controller \uc5b4\ub178\ud14c\uc774\uc158\uc744 \ud074\ub798\uc2a4\uc5d0 \uc801\uc6a9\ud55c\ub2e4.<br \/>\n2. @RequestMapping \uc5b4\ub178\ud14c\uc774\uc158\uc744 \uc774\uc6a9\ud574\uc11c \ucc98\ub9ac\ud560 \uc694\uccad \uacbd\ub85c\ub97c \uc9c0\uc815\ud55c\ub2e4.<br \/>\n3. \uc6f9 \ube0c\ub77c\uc6b0\uc800\uc758 \uc694\uccad\uc744 \ucc98\ub9ac\ud560 \uba54\uc18c\ub4dc\ub97c \uad6c\ud604\ud558\uace0, \ubdf0 \uc774\ub984\uc744 \ub9ac\ud134\ud55c\ub2e4.<\/p>\n<p>++\ubaa8\ub378++<br \/>\n\ubdf0\uc5d0\uc11c \uacb0\uacfc\ub97c \ubcf4\uc5ec\uc904 \ub54c \ud544\uc694\ud55c \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \ubc14\ub85c \ubaa8\ub378\uc774\ub2e4.<br \/>\n\ucee8\ud2b8\ub864\ub7ec\ub294 \ubdf0\uc5d0\uc11c \ud544\uc694\ub85c \ud558\ub294 \ub370\uc774\ud130\ub97c \ubaa8\ub378\uc5d0 \ub2f4\uc544\uc11c \uc804\ub2ec\ud558\uace0, \ubdf0\ub294 \uacb0\uacfc\ub97c \uc0dd\uc131\ud558\ub294\ub370 \ud544\uc694\ud55c \ub370\uc774\ud130\ub97c \ubaa8\ub378\uc5d0\uc11c \uac00\uc838\uc640 \uc0ac\uc6a9\ud558\uac8c \ub41c\ub2e4.<br \/>\n\ucee8\ud2b8\ub864\ub7ec\ub294 \ub2e4\uc591\ud55c \ubc29\uc2dd\uc73c\ub85c \ubaa8\ub378\uc5d0 \ub385\ud130\ub97c \ub2f4\uc744 \uc218 \uc788\ub294\ub370,<br \/>\n\uac00\uc7a5 \uac04\ub2e8\ud55c \ubc29\ubc95\uc740 Model\uc744 \ud30c\ub77c\ubbf8\ud130\ub85c \ucd94\uac00\ud558\uace0, Model \ud30c\ub77c\ubbf8\ud130\uc5d0 \ub370\uc774\ud130\ub97c \ucd94\uac00\ud558\ub294 \uac83\uc774\ub2e4.<\/p>\n<p>Model addAllAttribute(String attrName, Object attrValue)<br \/>\n: \uc774\ub984\uc774 attrname\uc774\uace0 \uac12\uc774 attrValue\uc778 \ubaa8\ub378 \uc18d\uc131\uc744 \ucd94\uac00\ud55c\ub2e4.<\/p>\n<p>Model addAllAttributes(Map&lt;String,?&gt; attributes)<br \/>\n: \ub9f5\uc758 &lt;\ud0a4, \uac12&gt; \uc30d\ub4e4\uc744 \ubaa8\ub378 \uc18d\uc131 \uc774\ub984\uacfc \uac12\uc73c\ub85c \ucd94\uac00\ud55c\ub2e4.<\/p>\n<p>ModelMap \ud074\ub798\uc2a4\ub294 Model \uc778\ud130\ud398\uc774\uc2a4\uc640 \ub3d9\uc77c\ud55c \uba54\uc18c\ub4dc\ub97c \uc81c\uacf5\ud558\uace0 \uc788\uae30 \ub54c\ubb38\uc5d0, addAtribute()\ub4f1\uc758 \uba54\uc18c\ub4dc\ub97c \uadf8\ub300\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p><span style=\"font-size: 20px;\"><strong>@RequestMaping\uc744 \uc774\uc6a9\ud55c \uc694\uccad \ub9e4\ud551<\/strong><\/span><\/p>\n<p>@RequestMapping \uc5b4\ub178\ud14c\uc774\uc158 : \ud074\ub77c\uc774\uc5b8\ud2b8\ub294URL\ub85c \uc694\uccad\uc744 \uc804\uc1a1\ud558\ub294\ub370, \uc694\uccad URL\uc744 \uc5b4\ub5a4 \uba54\uc18c\ub4dc\uac00 \ucc98\ub9ac\ud560\uc9c0 \uc5ec\ubd80\ub97c \uacb0\uc815\ud558\ub294 \uc5ed\ud560\uc744 \ud55c\ub2e4.<br \/>\n\ucee8\ud2b8\ub864\ub7ec\uc640 \uba54\uc18c\ub4dc\uc5d0 @RequestMapping \uc5b4\ub178\ud14c\uc774\uc158\uc744 \ubaa8\ub450 \uc0ac\uc6a9\ud558\uba74, \ud074\ub798\uc2a4\uc5d0 \uc801\uc6a9\ud55c \uac12\uacfc \uba54\uc18c\ub4dc\uc5d0 \uc801\uc6a9\ud55c \uac12\uc744 \uc870\ud569\ud574\uc11c \ub9e4\ud551\ub420 \uacbd\ub85c\ub97c \uacb0\uc815\ud55c\ub2e4.<br \/>\n\ud074\ub798\uc2a4\uc5d0 @RequestMapping \uc5b4\ub178\ud14c\uc787\u3134\uc744 \uc801\uc6a9\ud558\ub294 \uac83\uc740 \ucee8\ud2b8\ub864\ub7ec \ud074\ub798\uc2a4\uac00 \ud2b9\uc815 \uacbd\ub85c\ub97c \uae30\uc900\uc73c\ub85c \uadf8 \ud558\uc704 \uacbd\ub85c\ub9cc\uc744 \ucc98\ub9ac\ud55c\ub2e4\ub294 \uac83\uc744 \uc758\ubbf8\ud55c\ub2e4.<\/p>\n<pre class=\"prettyprint\">@Controller\r\n\tpublic class EventController {\r\n\t\r\n\t@RequestMapping(value=\"\/event\/create\", method=RequestMethod.POST) \/\/value = \uacbd\ub85c , method = HTTP\uc804\uc1a1\ubc29\uc2dd\r\n\tpublic String regist(Model model){ \/\/\ub370\uc774\ud130\ub97c \ub2f4\uc544 \ubdf0\uc5d0 \uc804\ub2ec\ud558\uae30\uc704\ud574 Model\uc744 \ud30c\ub77c\ubbf8\ud130\ub85c \ucd94\uac00.\r\n\t\t\r\n\t\tList&lt;Event&gt; eventList = getOpenedEventList();\r\n\t\tmodel.addAttribute('eventList', eventList); \/\/\ub370\uc774\ud130\ub97c \ub2f4\uc544 \ubdf0\uc5d0 \uc804\ub2ec\ud558\uae30\uc704\ud574 Model\ud30c\ub77c\ubbf8\ud130\uc5d0 \ub370\uc774\ud130\ucd94\uac00\r\n\t\t\r\n\t\treturn \"member\/registered\";\r\n\t}\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\ucee8\ud2b8\ub864\ub7ec\ub97c \uad6c\ud604\ud55c\ub2e4\ub294 \uac83\uc740 \ud074\ub77c\uc774\uc5b8\ud2b8\uc758 \uc694\uccad\uc744 \ucc98\ub9ac\ud560 \uba54\uc18c\ub4dc\ub97c \uad6c\ud604\ud55c\ub2e4\ub294 \uac83\uc744 \ub73b\ud55c\ub2e4. \uacfc\uc815\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4. 1. @Controller \uc5b4\ub178\ud14c\uc774\uc158\uc744 \ud074\ub798\uc2a4\uc5d0 \uc801\uc6a9\ud55c\ub2e4. 2. @RequestMapping \uc5b4\ub178\ud14c\uc774\uc158\uc744 \uc774\uc6a9\ud574\uc11c \ucc98\ub9ac\ud560 \uc694\uccad \uacbd\ub85c\ub97c \uc9c0\uc815\ud55c\ub2e4. 3. \uc6f9 \ube0c\ub77c\uc6b0\uc800\uc758 \uc694\uccad\uc744 \ucc98\ub9ac\ud560 \uba54\uc18c\ub4dc\ub97c \uad6c\ud604\ud558\uace0, \ubdf0 \uc774\ub984\uc744 \ub9ac\ud134\ud55c\ub2e4. ++\ubaa8\ub378++ \ubdf0\uc5d0\uc11c \uacb0\uacfc\ub97c \ubcf4\uc5ec\uc904 \ub54c \ud544\uc694\ud55c \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud558\uae30 \uc704\ud574 \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \ubc14\ub85c \ubaa8\ub378\uc774\ub2e4. \ucee8\ud2b8\ub864\ub7ec\ub294 \ubdf0\uc5d0\uc11c \ud544\uc694\ub85c \ud558\ub294 \ub370\uc774\ud130\ub97c \ubaa8\ub378\uc5d0<\/p>\n<footer class=\"entry-footer index-entry\">\n<div class=\"post-social pull-left\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=http%3A%2F%2Fhappily70.dothome.co.kr%2F%3Fp%3D431\" target=\"_blank\" class=\"social-icons\"><i class=\"fa fa-facebook\" aria-hidden=\"true\"><\/i><\/a><a href=\"https:\/\/twitter.com\/home?status=http%3A%2F%2Fhappily70.dothome.co.kr%2F%3Fp%3D431\" target=\"_blank\" class=\"social-icons\"><i class=\"fa fa-twitter\" aria-hidden=\"true\"><\/i><\/a><a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=http%3A%2F%2Fhappily70.dothome.co.kr%2F%3Fp%3D431&#038;title=%EC%BB%A8%ED%8A%B8%EB%A1%A4%EB%9F%AC+%EA%B5%AC%ED%98%84\" target=\"_blank\" class=\"social-icons\"><i class=\"fa fa-linkedin\" aria-hidden=\"true\"><\/i><\/a><\/div>\n<p class=\"link-more\"><a href=\"http:\/\/happily70.dothome.co.kr\/?p=431\" class=\"more-link\">Continue reading <span class=\"meta-nav\">\u2192<\/span><\/a><\/p>\n<\/footer>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,33,11],"tags":[],"class_list":["post-431","post","type-post","status-publish","format-standard","hentry","category-back-end","category-developement","category-spring"],"_links":{"self":[{"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/431"}],"collection":[{"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431"}],"version-history":[{"count":2,"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions"}],"predecessor-version":[{"id":433,"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions\/433"}],"wp:attachment":[{"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/happily70.dothome.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}