{"id":176,"date":"2019-06-21T11:06:46","date_gmt":"2019-06-21T02:06:46","guid":{"rendered":"http:\/\/2019se3.satoshis.jp\/?p=176"},"modified":"2019-06-25T09:56:53","modified_gmt":"2019-06-25T00:56:53","slug":"6%e6%9c%8821%e6%97%a5","status":"publish","type":"post","link":"https:\/\/2019se3.satoshis.jp\/?p=176","title":{"rendered":"6\u670821\u65e5"},"content":{"rendered":"<h3>\u5404\u5165\u529b\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3048\u3089\u30fc\u3092\u8868\u793a<\/h3>\n<p>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u305d\u308c\u305e\u308c\u306e\u5165\u529b\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u8fd1\u304f\u306b\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3001HTML\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5909\u66f4\u3059\u308b\u3002<\/p>\n<pre class=\"brush: xml; highlight: [49,50,51,52,58,59,60,61,67,68,69,70]; title: ; notranslate\" title=\"\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html xmlns:th=&quot;http:\/\/www.thymeleaf.org&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;UTF-8&quot;&gt;\r\n&lt;title&gt;top page&lt;\/title&gt;\r\n&lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text\/html; charset=UTF-8&quot; \/&gt;\r\n&lt;style type=&quot;text\/css&quot;&gt;\r\nh1 {\r\n  font-size: 18pt;\r\n  font-weight: bold;\r\n  color: gray;\r\n}\r\nbody {\r\n  font-size: 13pt;\r\n  color: gray;\r\n  margin: 5px 25px;\r\n}\r\npre {\r\n  border: solid 3px #ddd;\r\n  padding: 10px;\r\n}\r\ntr {\r\n  margin: 5px;\r\n}\r\nth {\r\n  padding: 5px;\r\n  color: white;\r\n  background: darkgray;\r\n}\r\ntd {\r\n  padding: 5px;\r\n  color: black;\r\n  background: #f0f0f0;\r\n}\r\n.err {\r\n  color: red;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;MyData page&lt;\/h1&gt;\r\n&lt;p th:text=&quot;${msg}&quot;&gt;&lt;\/p&gt;\r\n&lt;form method=&quot;post&quot; action=&quot;\/mydata&quot; th:object=&quot;${formModel}&quot;&gt;\r\n  &lt;table&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;&lt;label for=&quot;name&quot;&gt;\u540d\u524d&lt;\/label&gt;&lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=&quot;text&quot; name=&quot;name&quot; th:value=&quot;*{name}&quot;\r\n      \t\t\tth:errorclass=&quot;err&quot; \/&gt;\r\n      \t&lt;div th:if=&quot;${#fields.hasErrors('name')}&quot; th:errors=&quot;*{name}&quot;\r\n      \t\tth:errorclass=&quot;err&quot;&gt;&lt;\/div&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;&lt;label for=&quot;age&quot;&gt;\u5e74\u9f62&lt;\/label&gt;&lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=&quot;text&quot; name=&quot;age&quot; th:value=&quot;*{age}&quot;\r\n      \t\t\tth:errorclass=&quot;err&quot;\/&gt;\r\n      \t&lt;div th:if=&quot;${#fields.hasErrors('age')}&quot; th:errors=&quot;*{age}&quot;\r\n      \t\tth:errorclass=&quot;err&quot;&gt;&lt;\/div&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;&lt;label for=&quot;mail&quot;&gt;\u30e1\u30fc\u30eb&lt;\/label&gt;&lt;\/td&gt;\r\n      &lt;td&gt;\r\n        &lt;input type=&quot;text&quot; name=&quot;mail&quot; th:value=&quot;*{mail}&quot;\r\n        \tth:errorclass=&quot;err&quot;\/&gt;\r\n        &lt;div th:if=&quot;${#fields.hasErrors('mail')}&quot; th:errors=&quot;*{mail}&quot;\r\n        \tth:errorclass=&quot;err&quot;&gt;&lt;\/div&gt;\r\n      &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;&lt;label for=&quot;memo&quot;&gt;\u30e1\u30e2&lt;\/label&gt;&lt;\/td&gt;\r\n      &lt;td&gt;&lt;textarea name=&quot;memo&quot; th:value=&quot;*{memo}&quot; rows=&quot;5&quot; cols=&quot;20&quot;&gt;&lt;\/textarea&gt;&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n    &lt;tr&gt;\r\n      &lt;td&gt;&lt;\/td&gt;\r\n      &lt;td&gt;&lt;input type=&quot;submit&quot; \/&gt;&lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n  &lt;\/table&gt;\r\n&lt;\/form&gt;\r\n\r\n&lt;hr \/&gt;\r\n&lt;table&gt;\r\n  &lt;tr&gt;\r\n    &lt;th&gt;ID&lt;\/th&gt;&lt;th&gt;\u540d\u524d&lt;\/th&gt;&lt;th&gt;\u7de8\u96c6&lt;\/th&gt;&lt;th&gt;\u524a\u9664&lt;\/th&gt;\r\n  &lt;\/tr&gt;\r\n  &lt;tr th:each=&quot;obj : ${datalist}&quot;&gt;\r\n    &lt;td th:text=&quot;${obj.id}&quot;&gt;&lt;\/td&gt;\r\n    &lt;td th:text=&quot;${obj.name}&quot;&gt;&lt;\/td&gt;\r\n    &lt;td&gt;&lt;a th:href=&quot;@{'\/edit\/' + ${obj.id}}&quot;&gt;\u7de8\u96c6&lt;\/a&gt;&lt;\/td&gt;\r\n    &lt;td&gt;&lt;a th:href=&quot;@{'\/delete\/' + ${obj.id}}&quot;&gt;\u524a\u9664&lt;\/a&gt;&lt;\/td&gt;\r\n  &lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n\r\n\r\n&lt;pre th:text=&quot;${data}&quot;&gt;&lt;\/pre&gt;\r\n\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h3>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u65e5\u672c\u8a9e\u3067\u8868\u793a\u3059\u308b<\/h3>\n<p>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306bmessage\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"brush: java; highlight: [24,28,32,33]; title: ; notranslate\" title=\"\">\r\npackage jp.abc;\r\n\r\nimport javax.persistence.Column;\r\nimport javax.persistence.Entity;\r\nimport javax.persistence.GeneratedValue;\r\nimport javax.persistence.GenerationType;\r\nimport javax.persistence.Id;\r\nimport javax.validation.constraints.Email;\r\nimport javax.validation.constraints.Max;\r\nimport javax.validation.constraints.Min;\r\nimport javax.validation.constraints.NotEmpty;\r\nimport javax.validation.constraints.NotNull;\r\n\r\n\r\n@Entity\r\npublic class MyData {\r\n\t@Id\r\n\t@GeneratedValue(strategy = GenerationType.AUTO)\r\n\t@Column\r\n\t@NotNull\r\n\tprivate long id;\r\n\r\n\t@Column(length = 50, nullable = false)\r\n\t@NotEmpty(message=&quot;\u7a7a\u767d\u306f\u4e0d\u53ef&quot;)\r\n\tprivate String name;\r\n\r\n\t@Column(length = 200, nullable = true)\r\n\t@Email(message=&quot;\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u307f&quot;)\r\n\tprivate String mail;\r\n\r\n\t@Column(nullable = true)\r\n\t@Min(value=0, message=&quot;0\u4ee5\u4e0a&quot;)\r\n\t@Max(value=200, message=&quot;200\u4ee5\u4e0b&quot;)\r\n\tprivate Integer age;\r\n\r\n\t@Column(nullable = true)\r\n\tprivate String memo;\r\n\r\n\tpublic long getId() {\r\n\t\treturn id;\r\n\t}\r\n\r\n\tpublic void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}\r\n\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}\r\n\r\n\tpublic void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}\r\n\r\n\tpublic String getMail() {\r\n\t\treturn mail;\r\n\t}\r\n\r\n\tpublic void setMail(String mail) {\r\n\t\tthis.mail = mail;\r\n\t}\r\n\r\n\tpublic Integer getAge() {\r\n\t\treturn age;\r\n\t}\r\n\r\n\tpublic void setAge(Integer age) {\r\n\t\tthis.age = age;\r\n\t}\r\n\r\n\tpublic String getMemo() {\r\n\t\treturn memo;\r\n\t}\r\n\r\n\tpublic void setMemo(String memo) {\r\n\t\tthis.memo = memo;\r\n\t}\r\n\r\n}\r\n<\/pre>\n<h3>\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u307e\u3068\u3081\u3066\u6271\u3046<\/h3>\n<p>\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u7528\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306b message \u5f15\u6570\u3092\u8ffd\u52a0\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5\u3068\u306f\u5225\u306b\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u3042\u308b\u3002<\/p>\n<p>resources \u30d5\u30a9\u30eb\u30c0\u306bValidationMessages.properties \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3002<br \/>\n\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066[\u6b21\u3067\u958b\u304f]-[Limy\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30a8\u30c7\u30a3\u30bf\u30fc]\u3092\u9078\u629e\u3059\u308b\u3002<\/p>\n<p><img src=\"http:\/\/2019se3.satoshis.jp\/wp-content\/uploads\/2019\/06\/property-editor.png\" alt=\"\" width=\"500\" class=\"alignnone size-full wp-image-181\" srcset=\"https:\/\/2019se3.satoshis.jp\/wp-content\/uploads\/2019\/06\/property-editor.png 861w, https:\/\/2019se3.satoshis.jp\/wp-content\/uploads\/2019\/06\/property-editor-300x142.png 300w, https:\/\/2019se3.satoshis.jp\/wp-content\/uploads\/2019\/06\/property-editor-768x364.png 768w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306f\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u7528\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u30af\u30e9\u30b9\u540d\u306b\u7d9a\u3051\u3066\u300c.message = \u300d\u3092\u8ffd\u52a0\u3057\u3066\u3001\u53f3\u8fba\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8a18\u8ff0\u3059\u308b\u3002<br \/>\nMin\u3068Max\u306f\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306bvalue\u5f15\u6570\u3067\u6e21\u3057\u305f\u5024\u3092 {value} \u3067\u53d7\u3051\u53d6\u3063\u3066\u8868\u793a\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\njavax.validation.constraints.NotEmpty.message = \u7a7a\u767d\u306f\u4e0d\u53ef\u3067\u3059\u3002\r\njavax.validation.constraints.Email.message = \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\r\njavax.validation.constraints.Min.message = {value}\u3088\u308a\u5927\u304d\u304f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\njavax.validation.constraints.Max.message = {value}\u3088\u308a\u5c0f\u3055\u304f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n<\/pre>\n<h3>HSQLDB\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b<\/h3>\n<p>HSQLDB\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<br \/>\n\u691c\u7d22\u3057\u3066\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089hsqldb-2.4.1.zip \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<br \/>\nZIP\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u51cd\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u3092\u3001C:\\pleiades\\ \u306b\u7f6e\u304f\u3002<\/p>\n<p>\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u8d77\u52d5\u7528BAT\u30d5\u30a1\u30a4\u30eb hsqldb.bat \u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncd C:\\pleiades\\hsqldb-2.4.1\\hsqldb\\lib\r\njava -cp hsqldb.jar org.hsqldb.Server --database.0 db\/mydata --dbname.0 mydata\r\n<\/pre>\n<p>Mac\u306e\u4eba\u306f\u3001\u300c\u66f8\u985e\u300d\u30d5\u30a9\u30eb\u30c0\u306bHSQLDB\u3092\u89e3\u51cd\u3059\u308b\u3002<br \/>\n\u66f8\u985e\u30d5\u30a9\u30eb\u30c0\u306a\u3069\u306b\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb hsqldb.sh \u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#!\/bin\/sh\r\ncd ~\/Documents\/hsqldb\/lib\r\njava -cp hsqldb.jar org.hsqldb.Server --database.0 db\/mydata --dbname.0 mydata\r\n<\/pre>\n<p>hsqldb.sh \u3092\u4f5c\u6210\u5f8c\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ cd ~\/Documents\r\n# chmod +x .\/hsqldb.sh\r\n<\/pre>\n<p>hsqldb.bat \u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001HSQLDB\u30b5\u30fc\u30d0\u30fc\u304c\u8d77\u52d5\u3059\u308b\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u753b\u9762\u3092\u9589\u3058\u308b\u3068HSQLDB\u30b5\u30fc\u30d0\u30fc\u304c\u7d42\u4e86\u3059\u308b\u306e\u3067\u9589\u3058\u306a\u3044\u3053\u3068\u3002<br \/>\n\u8aa4\u3063\u3066\u9589\u3058\u306a\u3044\u3088\u3046\u306b\u6700\u5c0f\u5316\u3057\u3066\u304a\u304f\u3002<\/p>\n<p>application.properties \u30d5\u30a1\u30a4\u30eb\u306b\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nspring.datasource.url=jdbc:hsqldb:hsql:\/\/localhost\/mydata\r\nspring.datasource.username=sa\r\nspring.datasource.password=\r\nspring.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver\r\nspring.jpa.properties.hibernate.dialect=org.hibernate.dialect.HSQLDialect\r\n<\/pre>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u5404\u5165\u529b\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3048\u3089\u30fc\u3092\u8868\u793a \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u305d\u308c\u305e\u308c\u306e\u5165\u529b\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u8fd1\u304f\u306b\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3001HTML\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5909\u66f4\u3059\u308b\u3002 \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u65e5\u672c\u8a9e\u3067\u8868\u793a\u3059\u308b \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306bmess &hellip; <a href=\"https:\/\/2019se3.satoshis.jp\/?p=176\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;6\u670821\u65e5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,3],"tags":[],"_links":{"self":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/176"}],"collection":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=176"}],"version-history":[{"count":8,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":187,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/176\/revisions\/187"}],"wp:attachment":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}