{"id":260,"date":"2013-05-28T08:00:36","date_gmt":"2013-05-27T23:00:36","guid":{"rendered":"http:\/\/www.beeete2.com\/blog\/?p=260"},"modified":"2020-01-18T16:56:09","modified_gmt":"2020-01-18T07:56:09","slug":"playframework2%e3%81%ae%e3%82%a2%e3%83%89%e3%83%ac%e3%82%b9%e8%a8%ad%e8%a8%88%e3%83%bb%e3%83%bb%e3%83%bb","status":"publish","type":"post","link":"https:\/\/www.beeete2.com\/blog\/?p=260","title":{"rendered":"playframework2\u306e\u30a2\u30c9\u30ec\u30b9\u8a2d\u8a08\u30fb\u30fb\u30fb"},"content":{"rendered":"<p>\u666e\u901a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u4f7f\u3063\u3066\u3044\u306a\u3044\u30a2\u30d7\u30ea\u3060\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u540d = URL\u306b\u306a\u308b\u3053\u3068\u304c\u304a\u304a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\/index.html\u306f\/index.html\u3068\u30a2\u30af\u30bb\u30b9\u3059\u308c\u3070\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>playframework2\u306eURL\u306f\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u3066\u6c7a\u5b9a\u3055\u308c\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\u306a\u308b\u307b\u3069\u306a\u308b\u307b\u3069\u3002<br \/>\n\u305d\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u3001\/conf\/routes\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u6a19\u6e96\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n[perl]<br \/>\n# Home page<br \/>\nGET     \/                           controllers.Application.index()<br \/>\n# Map static resources from the \/public folder to the \/assets URL path<br \/>\nGET     \/assets\/*file               controllers.Assets.at(path=&quot;\/public&quot;, file)<br \/>\n[\/perl]<br \/>\n\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u306a\u306e\u3067\u3001\u3059\u3063\u3054\u3044\u30b7\u30f3\u30d7\u30eb\u306b\u8a18\u8ff0\u3057\u3066\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u306a\u3093\u3068\u306a\u304f\u308f\u304b\u308a\u307e\u3059\u3002<br \/>\ncontrollers\u30d1\u30c3\u30b1\u30fc\u30b8\u306eApplication\u30af\u30e9\u30b9\u306eindex\u3068\u3044\u3046\u30e1\u30c3\u30bd\u30c9\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3088\u30fc\u3063\u3066\u3044\u3046\u3053\u3068\u3067\u3059\u304b\u306d\u3002<\/p>\n<p>\u4eca\u56de\u3053\u306e\u307e\u307e\u8a18\u8ff0\u3057\u3066\u3044\u3063\u3066\u3082\u3044\u3044\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u305d\u308c\u3067\u306f\u3042\u307e\u308a\u306b\u3082\u82b8\u304c\u306a\u3044\u306e\u3068\u5c11\u3057routes\u30d5\u30a1\u30a4\u30eb\u306b\u3082\u6163\u308c\u305f\u3044\u306e\u3067\u3001\u65b0\u305f\u306b\u30d1\u30b9\u3092\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\/timeline\u306b\u30a2\u30af\u30bb\u30b9\u304c\u3042\u3063\u305f\u5834\u5408\u306f\u3001\u30c4\u30a4\u30fc\u30c8\u306e\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u30da\u30fc\u30b8\u3092\u8868\u793a\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n[perl]<br \/>\n# Home page<br \/>\nGET     \/                           controllers.Application.index()<br \/>\n# Twitter Timeline page<br \/>\nGET     \/timeline                   controllers.Application.index()<br \/>\n# Map static resources from the \/public folder to the \/assets URL path<br \/>\nGET     \/assets\/*file               controllers.Assets.at(path=&quot;\/public&quot;, file)<br \/>\n[\/perl]<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306bcontrollers.Application.index()\u3068\u3057\u307e\u3057\u305f\u306e\u3067\u3001\/timeline\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u304a\u304a\u3001\u7121\u4e8b\u306b\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-1.jpg\"><img decoding=\"async\" src=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-1.jpg\" alt=\"Welcome to Play 2.1-1\" width=\"1008\" height=\"642\" class=\"alignnone size-full wp-image-252\" srcset=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-1.jpg 1008w, https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-1-300x191.jpg 300w, https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-1-624x397.jpg 624w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/a><\/p>\n<p>\u4eca\u306f\u3001\u6700\u521d\u306e\u30b5\u30f3\u30d7\u30eb\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066\u304a\u308a\u307e\u3059\u306e\u3067\u3001timeline\u7528\u306e\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3001\u8868\u793a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<h4>conf\/routes<\/h4>\n<p>[perl]<br \/>\n# Home page<br \/>\nGET     \/                           controllers.Application.index()<\/p>\n<p># Twitter Timeline page<br \/>\nGET     \/timeline                   controllers.Application.timeline()<\/p>\n<p># Map static resources from the \/public folder to the \/assets URL path<br \/>\nGET     \/assets\/*file               controllers.Assets.at(path=&quot;\/public&quot;, file)<br \/>\n[\/perl]<\/p>\n<h4>views\/timeline.scala.html<\/h4>\n<p>\u3053\u3053\u3067\u3001\u4e00\u3064\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\nviews\/timeline.scala.html\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u3092\u8868\u793a\u3059\u308b\u30da\u30fc\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u3001\u5185\u5bb9\u306f\u9069\u5f53\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002<br \/>\n[html]<br \/>\n@(message: String)<\/p>\n<p>@main(&quot;Welcome to Play 2.1&quot;) {<br \/>\n\u30c6\u30b9\u30c8\u3067\u3059<br \/>\n}<br \/>\n[\/html]<\/p>\n<h4>controllers\/Application.java<\/h4>\n<p>timeline\u30e1\u30c3\u30bd\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u304c\u3001\u3053\u3053\u3067\u554f\u984c\u767a\u751f<br \/>\n[java]<br \/>\n    public static Result timeline() {<br \/>\n    \treturn ok(timeline.render(&quot;Your new application is ready.&quot;));<br \/>\n    }<br \/>\n[\/java]<br \/>\n\u3068\u66f8\u304d\u305f\u304b\u3063\u305f\u306e\u306b\u3001timeline\u306a\u3093\u3066\u306d\u3047\u3088\uff01\u3068\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\nviews\u4ee5\u4e0b\u306bscala.html\u3092\u7f6e\u3044\u305f\u3060\u3051\u3060\u3068\u3001\u3060\u3081\u306a\u3093\u3067\u3059\u304b\u306d\u3002\u8272\u3005\u3068\u8abf\u3079\u305f\u3068\u3053\u308d\u3001\u4e00\u5ea6\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u306a\u3044\u3068scala.html\u306e\u30af\u30e9\u30b9\u306f\u4f5c\u6210\u3055\u308c\u306a\u3044\u307f\u305f\u3044\u3067\u3059\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002<br \/>\n[bash]<br \/>\nplay compline<br \/>\n[\/bash]<br \/>\n\u3053\u308c\u3067\u30af\u30e9\u30b9\u30d5\u30a1\u30a4\u30eb\u306f\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u304c\u3001Eclipse\u304b\u3089\u306f\u8a8d\u8b58\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u66f4\u65b0\u3092\u3057\u307e\u3059\u3002\u3053\u308c\u3067\u7121\u4e8btimeline\u30af\u30e9\u30b9\u304c\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h4>\u5b9f\u884c<\/h4>\n<p>\u3067\u306f\u3001\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-2.jpg\"><img decoding=\"async\" src=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-2.jpg\" alt=\"Welcome to Play 2.1-2\" width=\"920\" height=\"662\" class=\"alignnone size-full wp-image-270\" srcset=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-2.jpg 920w, https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-2-300x215.jpg 300w, https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-2-624x449.jpg 624w\" sizes=\"(max-width: 920px) 100vw, 920px\" \/><\/a><\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u4eca\u56de\u306e\u76ee\u7684\u3067\u3042\u308b\u3001\/timeline\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001timeline\u5c02\u7528\u306e\u30da\u30fc\u30b8\u3092\u8868\u793a\u3067\u304d\u308b\u90e8\u5206\u307e\u3067\u4f5c\u6210\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u3001\u3082\u3046\u5c11\u3057\u624b\u3092\u5165\u308c\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4>Bootstarp\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u8868\u793a\u3055\u305b\u308b<\/h4>\n<p>\u524d\u56de\u306e\u8a18\u4e8b\u3067\u4f5c\u6210\u3057\u305f\u3001Twitter Bootstrap\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092timeline.scala.html\u306b\u66f8\u3044\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n[html]<br \/>\n@(message: String)<\/p>\n<p>@main(&quot;Welcome to Play 2.1&quot;) {<br \/>\n      &lt;!&#8211; Main hero unit for a primary marketing message or call to action &#8211;&gt;<br \/>\n      &lt;div class=&quot;hero-unit&quot;&gt;<br \/>\n        &lt;h1&gt;\u2605\u30e6\u30fc\u30b6\u30fc\u540d&lt;\/h1&gt;<br \/>\n        &lt;p&gt;\u2605\u6982\u8981&lt;\/p&gt;<br \/>\n        &lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;btn btn-primary btn-large&quot;&gt;Learn more &amp;raquo;&lt;\/a&gt;&lt;\/p&gt;<br \/>\n      &lt;\/div&gt;<br \/>\n      &lt;!&#8211; Example row of columns &#8211;&gt;<br \/>\n      &lt;div class=&quot;row&quot;&gt;<br \/>\n        &lt;div class=&quot;span4&quot;&gt;<br \/>\n          &lt;p&gt;\u2605\u30c4\u30a4\u30fc\u30c8&lt;\/p&gt;<br \/>\n          &lt;p&gt;&lt;a class=&quot;btn&quot; href=&quot;#&quot;&gt;View details &amp;raquo;&lt;\/a&gt;&lt;\/p&gt;<br \/>\n        &lt;\/div&gt;<br \/>\n        &lt;div class=&quot;span4&quot;&gt;<br \/>\n          &lt;p&gt;\u2605\u30c4\u30a4\u30fc\u30c8&lt;\/p&gt;<br \/>\n          &lt;p&gt;&lt;a class=&quot;btn&quot; href=&quot;#&quot;&gt;View details &amp;raquo;&lt;\/a&gt;&lt;\/p&gt;<br \/>\n       &lt;\/div&gt;<br \/>\n        &lt;div class=&quot;span4&quot;&gt;<br \/>\n          &lt;p&gt;\u2605\u30c4\u30a4\u30fc\u30c8&lt;\/p&gt;<br \/>\n          &lt;p&gt;&lt;a class=&quot;btn&quot; href=&quot;#&quot;&gt;View details &amp;raquo;&lt;\/a&gt;&lt;\/p&gt;<br \/>\n        &lt;\/div&gt;<br \/>\n      &lt;\/div&gt;<br \/>\n}<br \/>\n[\/html]<br \/>\n\u3067\u4fdd\u5b58\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-3.jpg\"><img decoding=\"async\" src=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-3.jpg\" alt=\"Welcome to Play 2.1-3\" width=\"943\" height=\"441\" class=\"alignnone size-full wp-image-273\" srcset=\"https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-3.jpg 943w, https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-3-300x140.jpg 300w, https:\/\/www.beeete2.com\/blog\/wp-content\/uploads\/2013\/05\/Welcome-to-Play-2.1-3-624x291.jpg 624w\" sizes=\"(max-width: 943px) 100vw, 943px\" \/><\/a><br \/>\n\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u4eca\u56de\u306e\u76ee\u7684\u306f\u9054\u6210\u3067\u3059\u3002<br \/>\n\u6b21\u56de\u306f\u3001Twitter\u304b\u3089\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066\u8868\u793a\u3055\u305b\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u666e\u901a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u4f7f\u3063\u3066\u3044\u306a\u3044\u30a2\u30d7\u30ea\u3060\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u540d = URL\u306b\u306a\u308b\u3053\u3068\u304c\u304a\u304a\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\/index.html\u306f\/index.html\u3068\u30a2\u30af\u30bb\u30b9\u3059\u308c\u3070\u8868\u793a\u3055\u308c\u307e\u3059\u3002 playframe &#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92],"tags":[6],"views":3856,"_links":{"self":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/260"}],"collection":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":16,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":2408,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions\/2408"}],"wp:attachment":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}