{"id":388,"date":"2014-04-06T16:24:14","date_gmt":"2014-04-06T07:24:14","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2014\/04\/06\/java_ee_7_rest_web\/"},"modified":"2014-04-06T16:24:14","modified_gmt":"2014-04-06T07:24:14","slug":"java_ee_7_rest_web","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2014\/04\/06\/java_ee_7_rest_web\/","title":{"rendered":"Java EE 7 \u691c\u8a3c\u74b0\u5883\u3092\u3064\u304f\u308b REST Web\u30b5\u30fc\u30d3\u30b9"},"content":{"rendered":"<p>Java EE 7 \u3092\u691c\u8a3c\u3059\u308b\u305f\u3081\u306b\u3001\u74b0\u5883\u3092\u3064\u304f\u308d\u3046\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3081\u3056\u3057\u3066\u3044\u308b\u306e\u306f\u3001Web \u30a2\u30d7\u30ea(MVC) + <a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114675\/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114675&amp;linkCode=as2&amp;tag=typea09-22\">REST<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873114675\" width=\"1\" height=\"1\"> Web\u30b5\u30fc\u30d3\u30b9 + EJB + JPA \u3092EAR\u306b\u307e\u3068\u3081\u308b\u3002\u3068\u3044\u3046\u3068\u3053\u308d\u3002<\/p>\n<p>\u306a\u308b\u3079\u304f\u3001<a href=\"http:\/\/www.oracle.com\/technetwork\/jp\/ondemand\/index-2007743-ja.html\">Java EE 7 \u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f<\/a>\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001\u6a19\u6e96\u306e\u307f\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3066\u307f\u305f\u304b\u3063\u305f\u306e\u3060\u304c\u3001<a href=\"https:\/\/www.typea.info\/blog\/index.php\/2014\/04\/02\/ubuntu_spring_tool_suite_java_ee_7\">\u306f\u3084\u3070\u3084\u3068\u65ad\u5ff5\u3057\u3066\u3001Web\u30a2\u30d7\u30ea\u306b\u306fSpring MVC\u3092\u4f7f\u3046\u3053\u3068\u306b<\/a>\u3002<\/p>\n<p>\u6b21\u306f\u3001<a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114675\/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114675&amp;linkCode=as2&amp;tag=typea09-22\">REST<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873114675\" width=\"1\" height=\"1\"> Web\u30b5\u30fc\u30d3\u30b9\u3092\u69cb\u7bc9\u3057\u3088\u3046\u3002<\/p>\n<p>\u3068\u3057\u3066\u3001\u5927\u306f\u307e\u308a\u3002Java EE \u3063\u3066\u3001\u7c21\u5358\u306b\u306a\u3063\u305f\u3093\u3058\u3083\u7121\u304b\u3063\u305f\u306e\u304b\u3088\uff5e \u3068\u304b\u3001<a href=\"http:\/\/www.coppermine.jp\/docs\/programming\/2014\/01\/the-end-of-glassfish.html\">GlassFish \u306f\u3084\u3063\u3071\u308a\u3082\u3046\u3084\u3070\u3044\u306e\u304b\u306a\uff5e<\/a> \u3068\u304b\u546a\u3044\u306e\u8a00\u8449\u3092\u5410\u304d\u306a\u304c\u3089\u30011\u65e5\u304f\u3089\u3044\u683c\u95d8\u3057\u305f\u306e\u3060\u3051\u3069\u3002\u3002\u3002<\/p>\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u306f\u3001\u304b\u306a\u308a\u7c21\u5358\u3002\u51c4\u304f\u4fbf\u5229\u306b\u306a\u3063\u3066\u3066\u9a5a\u3044\u305f\u3002<\/p>\n<p>\u307e\u305a\u3001\u3069\u3046\u52d5\u4f5c\u3055\u305b\u308b\u304b\u3092\u307e\u3068\u3081\u308b\u3002<\/p>\n<p>\u305d\u306e\u3042\u3068\u3001\u3069\u3046\u82e6\u52b4\u3057\u305f\u306e\u304b\u3001\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u9811\u5f35\u3063\u305f\u8ecc\u8de1\u3068\u3057\u3066\u8a18\u9332\u3057\u3066\u304a\u3053\u3046\u3068\u601d\u3046\u3002<\/p>\n<h2>1.<a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114675\/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114675&amp;linkCode=as2&amp;tag=typea09-22\">REST<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873114675\" width=\"1\" height=\"1\"> Web\u30b5\u30fc\u30d3\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/h2>\n<p><a href=\"https:\/\/www.typea.info\/blog\/index.php\/2014\/04\/02\/ubuntu_spring_tool_suite_java_ee_7\">Spring\u3000Tool Suite \u306b\u3001Spring MVC \u3092 EAR\u306b\u542b\u3081\u305f\u72b6\u614b\u3092\u4f5c\u6210\u3057\u305f<\/a> \u306e\u3067\u3001\u305d\u3053\u306b\u3001<a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114675\/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114675&amp;linkCode=as2&amp;tag=typea09-22\">REST<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873114675\" width=\"1\" height=\"1\"> Web\u30b5\u30fc\u30d3\u30b9\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3002 Spring MVC \u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u304b\u3093\u305f\u3093\u306b\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001Spring Tool Suite \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3060\u3051\u306a\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u306f\u3001Eclipse WTP \u3067\u3082\u540c\u3058\u3002<\/p>\n<h3>1.1 Dynamic Web \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<\/h3>\n<p>\u65b0\u898f\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u304b\u3089\u3001Dynamic Web Project \u3092\u9078\u629e\u3002<\/p>\n<p>\u30a6\u30a3\u30b6\u30fc\u30c9\u3067\u3001EAR membership \u306e Add project to an EATR \u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u308b\u3002<\/p>\n<p>\u3053\u3053\u3067\u5165\u308c\u306a\u304f\u3066\u3082\u3001\u3042\u3068\u3067\u3001EAR \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u8ffd\u52a0\u3067\u304d\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/create_rest_proj_to_ear.png\"><img loading=\"lazy\" decoding=\"async\" title=\"create_rest_proj_to_ear\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"create_rest_proj_to_ear\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/create_rest_proj_to_ear_thumb.png\" width=\"285\" height=\"267\"><\/a> <\/p>\n<h2>2. <a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114675\/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114675&amp;linkCode=as2&amp;tag=typea09-22\">REST<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873114675\" width=\"1\" height=\"1\"> Web \u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9\u3092\u4f5c\u6210<\/h2>\n<pre class=\"prettyprint linenums\">package info.typea.tallarico.rest;\r\n\r\nimport javax.ws.rs.GET;\r\nimport javax.ws.rs.Path;\r\nimport javax.ws.rs.Produces;\r\nimport javax.ws.rs.core.MediaType;\r\n\r\n@Path(\"\/hello\")\r\npublic class Hello {\r\n\r\n\t@GET\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\tpublic String greet() {\r\n\t\treturn \"&lt;html&gt;&lt;h1&gt;Hello REST World!&lt;\/h1&gt;\";\r\n\t}\r\n\r\n}\r\n<\/pre>\n<p>\u4e00\u756a\u30b7\u30f3\u30d7\u30eb\u306a\u5f62\u3067\u52d5\u4f5c\u78ba\u8a8d\u3002<\/p>\n<p>ApplicationConfig \u30af\u30e9\u30b9\u3092\u4f5c\u6210<\/p>\n<pre class=\"prettyprint linenums\">package info.typea.tallarico.rest;\r\n\r\nimport javax.ws.rs.core.Application;\r\n\r\n@javax.ws.rs.ApplicationPath(\"resources\")\r\npublic class ApplicationConfig extends Application{\r\n\r\n}<\/pre>\n<h2>3.\u5b9f\u884c<\/h2>\n<p><a href=\"http:\/\/localhost:8080\/TallaricoRest\/resources\/hello\">http:\/\/localhost:8080\/TallaricoRest\/resources\/hello<\/a><\/p>\n<p>\u306b\u30a2\u30af\u30bb\u30b9<\/p>\n<p>\u53d6\u5f97\u3067\u304d\u305f!<\/p>\n<p>\u6210\u529f<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/rest_project_success.png\"><img loading=\"lazy\" decoding=\"async\" title=\"rest_project_success\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"rest_project_success\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/rest_project_success_thumb.png\" width=\"409\" height=\"232\"><\/a> <\/p>\n<p>\u4ee5\u4e0a\uff01<\/p>\n<p>\u308f\u304b\u3063\u3066\u307f\u308c\u3070\u3001\u51c4\u304f\u7c21\u5358\uff01\u4f55\u306e\u8a2d\u5b9a\u3082\u3057\u3066\u3044\u306a\u3044\u3002<\/p>\n<p>\u2193 \u4ee5\u4e0b\u86c7\u8db3\u3002<\/p>\n<h2>4.\u306f\u307e\u3063\u305f\u70b9<\/h2>\n<p>\u7d50\u5c40\u3001ApplicationConfig \u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u308f\u304b\u3089\u305a\u306b1\u65e5\u306f\u307e\u3063\u3066\u305f\u3002<\/p>\n<h3>4.1 Jeresy \u3092\u660e\u793a\u7684\u306b\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3063\u305f<\/h3>\n<p>\u4e0a\u8a18\u4f8b\u3067\u306f\u3001ApplicationConfig \u306b &#8220;resources\u201d \u3068\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d1\u30b9\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u304c\u3001\u3053\u308c\u306b\u6c17\u3065\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u624b\u306e\u8a2d\u5b9a\u306f\u4e0d\u8981\u306b\u306a\u3063\u305f\u3093\u3058\u3083\u7121\u3044\u306e\u304b\u306a\u3041\u306a\u3069\u3068\u601d\u3044\u306a\u304c\u3089\u3001web.xml \u306b\u660e\u793a\u7684\u306bJeresy \u306e\u8a2d\u5b9a\u3092\u8a66\u307f\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">&lt;servlet&gt;\r\n    &lt;servlet-name&gt;Jersey Web Application&lt;\/servlet-name&gt;\r\n    &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;\/servlet-class&gt;\r\n&lt;\/servlet&gt;\r\n&lt;servlet-mapping&gt;\r\n    &lt;servlet-name&gt;Jersey Web Application&lt;\/servlet-name&gt;\r\n    &lt;url-pattern&gt;\/webapi\/*&lt;\/url-pattern&gt;\r\n&lt;\/servlet-mapping&gt;<\/pre>\n<h3>4.2 Unable to load class \u304c\u767a\u751f\u3057\u3066\u52d5\u304b\u306a\u3044<\/h3>\n<pre class=\"prettyprint linenums\">2014-04-05T01:19:10.652+0900|\u8b66\u544a: Unable to load class info.typea.tallarico.rest.Hello, reason: java.lang.ClassNotFoundException: info.typea.tallarico.rest.Hello\r\n<\/pre>\n<p>\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3001\u52d5\u304b\u306a\u3044\u3002\u3002\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/glassfish_error.png\"><img loading=\"lazy\" decoding=\"async\" title=\"glassfish_error\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"glassfish_error\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/glassfish_error_thumb.png\" width=\"504\" height=\"58\"><\/a> <\/p>\n<h3>4.3 \u539f\u56e0\u306e\u8abf\u67fb<\/h3>\n<ul>\n<li><a href=\"https:\/\/java.net\/jira\/browse\/GLASSFISH-16937\">GLASSFISH-16937 Having REST services in separate WARs in a single EAR prints classloading warnings<\/a>\n<li><a href=\"https:\/\/java.net\/jira\/browse\/GLASSFISH-16249\">GLASSFISH-16249 EAR deployment with multiple embedded WARs broken in 3.1<\/a>\n<li><a href=\"https:\/\/java.net\/jira\/browse\/GLASSFISH-20720\">GLASSFISH-20720 EAR deployment with multiple embedded WARs broken in 3.1.2.2 and 4.0<\/a><\/li>\n<\/ul>\n<p>\u3042\u305f\u308a\u306e\u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u304c\u307f\u3064\u304b\u308b\u3002<\/p>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4873114675\/ref=as_li_ss_tl?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=4873114675&amp;linkCode=as2&amp;tag=typea09-22\">REST<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-left-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4873114675\" width=\"1\" height=\"1\"> \u30b5\u30fc\u30d3\u30b9\u3084\u3001EAR \u306b\u8907\u6570\u306eWAR\u304c\u542b\u307e\u308c\u308b\u72b6\u6cc1\u3067\u3001\u540c\u69d8\u306e\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u3066\u3044\u308b\u3002\u307e\u3055\u306b\u3001\u4eca\u306e\u81ea\u5206\u306e\u72b6\u6cc1\u3058\u3083\u306a\u3044\u304b\uff01<a href=\"https:\/\/java.net\/jira\/browse\/GLASSFISH\/fixforversion\/16103\">4.0_b74<\/a> \u3084\u3001<a href=\"https:\/\/java.net\/jira\/browse\/GLASSFISH\/fixforversion\/16061\">4.0.1<\/a> \u3067Fix \u3068\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<h3>4.4 GlassFish \u306e\u7f6e\u304d\u63db\u3048<\/h3>\n<ul>\n<li><a title=\"http:\/\/dlc.sun.com.edgesuite.net\/glassfish\/4.0\/promoted\/\" href=\"http:\/\/dlc.sun.com.edgesuite.net\/glassfish\/4.0\/promoted\/\">http:\/\/dlc.sun.com.edgesuite.net\/glassfish\/4.0\/promoted\/<\/a>\n<li><a title=\"http:\/\/dlc.sun.com.edgesuite.net\/glassfish\/4.0.1\/nightly\/\" href=\"http:\/\/dlc.sun.com.edgesuite.net\/glassfish\/4.0.1\/nightly\/\">http:\/\/dlc.sun.com.edgesuite.net\/glassfish\/4.0.1\/nightly\/<\/a><\/li>\n<\/ul>\n<p>\u4e0a\u8a18\u3042\u305f\u308a\u304b\u3089\u3001\uff27\uff4c\uff41\uff53\uff53\uff26\uff49\uff53\uff48 \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u5165\u308c\u66ff\u3048\u3066\u8a66\u3059\u3002<\/p>\n<p>\u6700\u521d\u30014.0 \u7cfb\u3067\u73fe\u5728\u6700\u65b0\u7248(glassfish-4.0-b89-ml.zip)\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u8a66\u3059\u3082\u3001\u75c7\u72b6\u304c\u6539\u5584\u3057\u306a\u304b\u3063\u305f\u304c\u3001\u305d\u3082\u305d\u3082\u3001\u6700\u521d\u304b\u3089 b89 \u3060\u3063\u305f\u308a\u3068\u8ff7\u8d70\u3002\u7d50\u5c40\u30014.0.1 \u306e\u6700\u65b0\u7248(glassfish-4.0.1-b04-12_31_2013-ml.zip ) \u3067\u3082\u89e3\u6c7a\u305b\u305a\u3002<\/p>\n<p>\u3053\u3093\u306a\u98a8\u306b\u3081\u3093\u3069\u304f\u3055\u3044\u304b\u3089\u3001Java \u304c\u656c\u9060\u3055\u308c\u308b\u3093\u3060\u3088\uff01\u306a\u3069\u3068\u3061\u3087\u3063\u3068\u3084\u3051\u6c17\u5473\u306b\u306a\u3063\u3066\u304f\u308b\u3002<\/p>\n<h3>4.5 \u5358\u72ec\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3082\u518d\u73fe<\/h3>\n<p>\u4e0a\u8a18\u306e\u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u3067\u306f\u3001EAR\u306b\u4e8c\u3064\u4ee5\u4e0a\u306eWAR\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u306b\u767a\u751f\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u5358\u72ec\u3067\u5148\u305a\u306f\u69cb\u6210\u3057\u3066\u307f\u3088\u3046\u3068\u8a66\u307f\u308b\u3002<\/p>\n<p>\u7d50\u679c\u3001\u5358\u72ec\u306eWAR\u3067\u3082\u518d\u73fe\u3002\u9014\u65b9\u306b\u66ae\u308c\u308b\u3002<\/p>\n<h3>4.6 \u8a66\u884c\u932f\u8aa4<\/h3>\n<p>Spring Tool Suite \u306e\u624b\u9806\u901a\u308a\u306b\u69cb\u7bc9\u3057\u3066\u307f\u3088\u3046\u3002<\/p>\n<p>\u3068\u3001Spring Tool Suite \u306e Getting Start \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089 REST \u30b5\u30fc\u30d3\u30b9\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u69cb\u6210\u3057\u3066\u307f\u308b\u3002<\/p>\n<p><a title=\"http:\/\/spring.io\/guides\/gs\/rest-service\/\n\" href=\"http:\/\/spring.io\/guides\/gs\/rest-service\/\">http:\/\/spring.io\/guides\/gs\/rest-service\/<br \/><\/a><\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/gs_spring_rest_service03.png\"><img loading=\"lazy\" decoding=\"async\" title=\"gs_spring_rest_service03\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"gs_spring_rest_service03\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/gs_spring_rest_service03_thumb.png\" width=\"382\" height=\"217\"><\/a> <\/p>\n<p>\u304c\u3001\u9014\u4e2d\u3067\u3001\u5b8c\u5168\u306b\u65b9\u5411\u6027\u3092\u898b\u5931\u3063\u3066\u3044\u308b(\u3053\u306e\u307e\u307e\u3067\u306f\u3001REST\u30b5\u30fc\u30d3\u30b9\u307e\u3067Spring\u4f9d\u5b58\u306b\u306a\u3063\u3066\u3057\u307e\u3046)\u3053\u3068\u306b\u6c17\u3065\u304d\u3001\u3068\u308a\u3084\u3081\u3002<\/p>\n<h3>4.7 \u89e3\u6c7a\u3078<\/h3>\n<p>\u3053\u3053\u307e\u3067\u304f\u308b\u3068\u3001\u4f55\u3068\u304b\u3057\u305f\u3044\u3002<a href=\"https:\/\/netbeans.org\/features\/index_ja.html\">NetBeans IDE<\/a> \u306e\u5b58\u5728\u304c\u982d\u3092\u3088\u304e\u308b\u3002\u3084\u3064\u306a\u3089\u3001\u7c21\u5358\u306b\u305d\u308c\u304f\u3089\u3044\u306e\u3053\u3068\u3092\u3084\u3063\u3066\u304f\u308c\u308b\u304b\u3082\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<p><a href=\"https:\/\/netbeans.org\/downloads\/index.html\">Linux \u3088\u3046\u306e &#8220;\u3059\u3079\u3066&#8221; \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/netbeans_install01.png\"><img loading=\"lazy\" decoding=\"async\" title=\"netbeans_install01\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"netbeans_install01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/netbeans_install01_thumb.png\" width=\"335\" height=\"190\"><\/a> <\/p>\n<p>chmod +x \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb \u3067 \u5b9f\u884c\u6a29\u9650\u3092\u4ed8\u4e0e\u3057\u305f\u4e0a\u3067\u5b9f\u884c\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/netbeans_install02.png\"><img loading=\"lazy\" decoding=\"async\" title=\"netbeans_install02\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"netbeans_install02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/netbeans_install02_thumb.png\" width=\"244\" height=\"204\"><\/a> <\/p>\n<p>\u30a6\u30a3\u30b6\u30fc\u30c9\u306b\u5f93\u3044\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3001REST:HelloWorld \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3001\u8d77\u52d5\u3057\u3066\u307f\u308b<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/nb_rest_proj01.png\"><img loading=\"lazy\" decoding=\"async\" title=\"nb_rest_proj01\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"nb_rest_proj01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/nb_rest_proj01_thumb.png\" width=\"370\" height=\"248\"><\/a> <\/p>\n<p>\u306a\u3093\u3068\u3001\u3044\u3068\u3082\u7c21\u5358\u306b\u8d77\u52d5\u3059\u308b\u3058\u3083\u306a\u3044\u304b\u3002NetBeans\u4eba\u6c17\u304c\u3042\u308b\u306e\u3082\u308f\u304b\u308b\u3002<\/p>\n<p>\u3067\u3001\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u6210\u3092\u78ba\u8a8d\u3057\u3066\u3001ApplicationConfig \u304c\u8db3\u308a\u306a\u304b\u3063\u305f\u3053\u3068\u306b\u601d\u3044\u81f3\u308a\u3001Spring\u3000Tool Suite \u3067\u52d5\u4f5c\u3055\u305b\u308b\u306b\u81f3\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/nb_rest_proj03.png\"><img loading=\"lazy\" decoding=\"async\" title=\"nb_rest_proj03\" style=\"border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px\" border=\"0\" alt=\"nb_rest_proj03\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/JavaEE7RESTWeb_D62C\/nb_rest_proj03_thumb.png\" width=\"379\" height=\"215\"><\/a> <\/p>\n<h2>5.\u7d50\u8ad6\u3068\u3044\u3046\u304b\u96d1\u611f<\/h2>\n<p>NetBeans \u983c\u308a\u306b\u306a\u308b\uff01\u56f0\u3063\u305f\u3068\u304d\u306b\u306f\u3001NetBeans \u3067\u30b5\u30f3\u30d7\u30eb\u3064\u304f\u308b\u3068\u3001\u78ba\u5b9f\u306b\u52d5\u304f<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u69cb\u9020\u89e3\u6790\u3059\u308b\u306e\u306b\u6700\u9069\uff01<\/p>\n<p>\u305f\u3060\u3001\u3069\u3046\u3057\u3066\u3082\u30a8\u30c7\u30a3\u30bf\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u30b7\u30e3\u30ae\u30fc\u306a\u306e\u304c\u30c0\u30e1\u306a\u3093\u3060\u3088\u306a\u30fc<\/p>\n<p>\u3068\u3044\u3046\u306e\u3068\u3001Eclipse \u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u304c\u624b\u306b\u306a\u3058\u3093\u3067\u3044\u308b\u306e\u3067\u3001Eclipse\u304b\u3089\u96e2\u308c\u3089\u308c\u306a\u3044\u3002<\/p>\n<p>\u3057\u304b\u3057\u306a\u30fcJava \u306e\u3053\u306e\u7d44\u5408\u305b\u7206\u767a\u7684\u306a\u72b6\u614b\u304c\u3084\u3063\u3071\u308a\u656c\u9060\u3055\u3048\u308b\u539f\u56e0\u306b\u306a\u3063\u3066\u308b\u3093\u3060\u308d\u3046\u306a\u3041\u3068\u306f\u601d\u3046\u3002<\/p>\n<p>\u6700\u7d42\u7684\u306b\u306f\u51c4\u304f\u7c21\u5358\u306b\u3067\u304d\u305f\u306e\u3067\u3088\u304b\u3063\u305f\u306e\u3060\u304c\u3001\u3053\u3053\u307e\u3067\u305f\u3069\u308a\u7740\u304f\u306e\u306b\u82e6\u52b4\u3059\u308b\u3082\u306e\u306a\u306e\u304b\u3002<\/p>\n<p>\u307e\u3041\u81ea\u5206\u306e\u62d9\u3055\u3082\u3042\u308b\u306e\u3060\u308d\u3046\u304c\u3001\u3053\u308c\u3067\u306f\u521d\u5b66\u8005\u306bWelcome\uff01\u3068\u3044\u3046\u308f\u3051\u306b\u306f\u3044\u304b\u306a\u3044\u3060\u308d\u3046\u306a\u3041\u3002<\/p>\n<p>EJB\u3068\u304b\u3001JPA\u3092\u3053\u308c\u304b\u3089\u8a66\u3057\u3066\u898b\u3088\u3046\u3068\u601d\u3046\u304c\u3001\u5148\u304c\u601d\u3044\u3084\u3089\u308c\u308b\u3002\u3002\u3002<\/p>\n<p>NetBeans\u983c\u307f\u3060\u306a\u3053\u308a\u3083\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>NetBeans\u3092\u4f7f\u3063\u3066\u3001Java \u3092\u4e00\u304b\u3089\u899a\u3048\u308b\u306e\u306b\u306f\u3001\u6700\u9069\u306a\u4e00\u518a\u3002<\/p>\n<p><iframe style=\"height: 240px; width: 120px\" marginheight=\"0\" src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=FFFFFF&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=typea09-22&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=B00GY3XUB8\" frameborder=\"0\" marginwidth=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java EE 7 \u3092\u691c\u8a3c\u3059\u308b\u305f\u3081\u306b\u3001\u74b0\u5883\u3092\u3064\u304f\u308d\u3046\u3068\u3057\u3066\u3044\u308b\u3002 \u3081\u3056\u3057\u3066\u3044\u308b\u306e\u306f\u3001Web \u30a2\u30d7\u30ea(MVC) + REST Web\u30b5\u30fc\u30d3\u30b9 + EJB + JPA \u3092EAR\u306b\u307e\u3068\u3081\u308b\u3002\u3068\u3044\u3046\u3068\u3053\u308d\u3002 \u306a\u308b\u3079\u304f\u3001Java  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[65,46,66,67],"tags":[],"class_list":["post-388","post","type-post","status-publish","format-standard","hentry","category-glassfish","category-java-ee","category-netbeans","category-rest"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=388"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/388\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}