{"id":50896,"date":"2024-03-27T00:00:00","date_gmt":"2024-03-27T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/"},"modified":"2025-11-14T07:56:40","modified_gmt":"2025-11-14T15:56:40","slug":"voting-web-platform","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/","title":{"rendered":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9"},"content":{"rendered":"<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u6295\u7968\u30d7\u30ed\u30bb\u30b9\u5168\u4f53\u3092\u4fc3\u9032\u3059\u308b\u305f\u3081\u306b\u6700\u5148\u7aef\u306e\u6280\u8853\u3092\u6d3b\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u306b\u306f\u3001\u5b89\u5168\u306a\u30a6\u30a7\u30d6\u30dd\u30fc\u30bf\u30eb\u304b\u3089\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u307e\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u5f62\u614b\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u304c\u8ab2\u984c\u3068\u306a\u3063\u3066\u3044\u308b\u72b6\u6cc1\u3067\u8f1d\u304d\u3092\u653e\u3061\u3001\u79fb\u52d5\u306e\u554f\u984c\u306b\u76f4\u9762\u3059\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u4eba\u3084\u5730\u7406\u7684\u306b\u96e2\u308c\u305f\u5834\u6240\u306b\u3044\u308b\u4eba\u304c\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u53c2\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u5927\u898f\u6a21\u306a\u9078\u6319\u306b\u304a\u3044\u3066\u975e\u5e38\u306b\u8cb4\u91cd\u3067\u3042\u308a\u3001\u6295\u7968\u30d7\u30ed\u30bb\u30b9\u3092\u8fc5\u901f\u5316\u3057\u3001\u624b\u4f5c\u696d\u306b\u3088\u308b\u96c6\u8a08\u306b\u5fc5\u8981\u306a\u6642\u9593\u3068\u30ea\u30bd\u30fc\u30b9\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30a9\u30ed\u30fc\u3059\u308b\u65b9\u6cd5<\/h2>\n<p>\u79c1\u305f\u3061\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u5165\u624b\u3067\u304d\u307e\u3059\uff1a<\/p>\n<p>git clone https:\/\/github.com\/alifruliarso\/spring-boot-blog-voting.git &#8211;branch voting-system<\/p>\n<h3>\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u306f\u3069\u3053\u3067\u6700\u3082\u5f79\u306b\u7acb\u3064\u3067\u3057\u3087\u3046\u304b\uff1f<\/h3>\n<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3046\u306e\u306f\u826f\u3044\u30a2\u30a4\u30c7\u30a2\u3067\u3059\uff1a<\/p>\n<ul>\n<li>\u65b9\u91dd\u6c7a\u5b9a\u306b\u3088\u308b\u898f\u5247\u3084\u898f\u5b9a\u3078\u306e\u6295\u7968<\/li>\n<li>\u53d7\u8cde\u5019\u88dc\u306e\u9078\u629e<\/li>\n<li>\u5f93\u696d\u54e1\u304b\u3089\u533f\u540d\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u96c6\u3081\u308b<\/li>\n<\/ul>\n<h2>\u79c1\u305f\u3061\u304c\u69cb\u7bc9\u3057\u3066\u3044\u308b\u3082\u306e<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001Spring Boot\u3068NoSQL\u3092\u4f7f\u3063\u3066\u30b7\u30f3\u30d7\u30eb\u306a\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Docker\u30b3\u30f3\u30c6\u30ca\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u3059\u308b\u65c5\u306b\u51fa\u307e\u3059\u3002\u79c1\u305f\u3061\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30d6\u30ed\u30b0\u8a18\u4e8b\u306b\u5bfe\u3057\u3066\u610f\u898b\u3092\u8868\u660e\u3059\u308b\u529b\u3092\u4e0e\u3048\u3001\u8b70\u8ad6\u3084\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u306e\u6d3b\u6c17\u3042\u308b\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3092\u80b2\u6210\u3059\u308b\u3053\u3068\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u8981\u4ef6<\/h3>\n<p>\u3053\u308c\u307e\u3067\u306e\u6982\u8981\u306b\u57fa\u3065\u304d\u3001\u4ee5\u4e0b\u306e\u6a5f\u80fd\u8981\u4ef6\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n<ol>\n<li>\u30b7\u30f3\u30d7\u30eb\u306a\u30d5\u30a9\u30fc\u30e0\u3067\u30d6\u30ed\u30b0\u3092\u4f5c\u6210\u3059\u308b<\/li>\n<li>\u30d6\u30ed\u30b0\u8a18\u4e8b\u3078\u306e\u6295\u7968\uff08\u30a2\u30c3\u30d7\u30f4\u30a9\u30fc\u30c8\u307e\u305f\u306f\u30c0\u30a6\u30f3\u30f4\u30a9\u30fc\u30c8\uff09\u3002\u30ed\u30b0\u30a4\u30f3\/\u30ed\u30b0\u30a2\u30a6\u30c8\u306f\u306a\u304f\u3001\u30e9\u30f3\u30c0\u30e0\u306b\u30e6\u30fc\u30b6\u30fc\u3092\u751f\u6210\u3059\u308b\u3002<\/li>\n<li>\u6295\u7968\u7d50\u679c\u3092\u9759\u7684\u304b\u3064\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c1\u30e3\u30fc\u30c8\u3067\u53ef\u8996\u5316\u3059\u308b\u3002<\/li>\n<\/ol>\n<p>\u7bc4\u56f2\u5916\uff1a * \u30e6\u30fc\u30b6\u30fc\u7ba1\u7406 (\u767b\u9332\u3001\u30ed\u30b0\u30a4\u30f3\u306a\u3069) * \u30d6\u30ed\u30b0\u7ba1\u7406 (\u4f5c\u6210\u3001\u7de8\u96c6\u3001\u524a\u9664)<\/p>\n<h3>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/h3>\n<p>SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u9078\u629e\u306f\u3001\u7279\u5b9a\u306e\u8981\u4ef6\u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u30b7\u30b9\u30c6\u30e0\u3067SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3088\u308a\u3082NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u597d\u307e\u308c\u308b\u7406\u7531\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<ol>\n<li>\u6c34\u5e73\u65b9\u5411\u306e\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\uff1a NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u901a\u5e38\u3001\u6c34\u5e73\u65b9\u5411\u306e\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u304c\u5bb9\u6613\u3067\u3042\u308b\u3002<\/li>\n<li>\u30af\u30a8\u30ea\u69cb\u9020\uff1a \u3053\u306e\u5834\u5408\u3001\u30c6\u30fc\u30d6\u30eb\u7d50\u5408\u306e\u3088\u3046\u306a\u8907\u96d1\u306a\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u64cd\u4f5c\u306f\u5fc5\u8981\u306a\u3044\u3002<\/li>\n<li>NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u901a\u5e38\u3001\u5206\u6563\u5206\u6563\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3067\u69cb\u7bc9\u3055\u308c\u3066\u304a\u308a\u3001\u30af\u30e9\u30b9\u30bf\u306b\u30ce\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u5bb9\u6613\u306b\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\u3067\u304d\u308b\u3002<\/li>\n<\/ol>\n<h2>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<h3>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5fc5\u8981\u306a\u3082\u306e<\/h3>\n<ul>\n<li><a href=\"https:\/\/jdk.java.net\/21\/\">Java 17 or later<\/a>, <a href=\"https:\/\/maven.apache.org\/download.cgi\">Maven 3.5+<\/a>, <a href=\"https:\/\/docs.docker.com\/engine\/install\/\">Docker engine<\/a>, \u3068\u304a\u597d\u304d\u306a\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf(<a href=\"https:\/\/spring.io\/guides\/gs\/intellij-idea\/\">Intellij IDEA<\/a>, or <a href=\"https:\/\/spring.io\/guides\/gs\/guides-with-vscode\/\">VSCode<\/a>)<\/li>\n<\/ul>\n<h3>Spring Boot\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>Spring Boot\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u9ad8\u901f\u306b\u30d3\u30eb\u30c9\u3059\u308b\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002Spring Boot\u306f\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3059\u308b\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u305b\u3093\u3002\u305d\u306e\u4ee3\u308f\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3059\u308b\u3068\u3001Spring Boot\u304cBean\u3068\u8a2d\u5b9a\u3092\u52d5\u7684\u306b\u914d\u7dda\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u9069\u7528\u3057\u307e\u3059\u3002Spring Boot\u3092\u4f7f\u3048\u3070\u3001\u30d3\u30b8\u30cd\u30b9\u6a5f\u80fd\u306b\u3082\u3063\u3068\u96c6\u4e2d\u3067\u304d\u3001\u30a4\u30f3\u30d5\u30e9\u306b\u306f\u3042\u307e\u308a\u96c6\u4e2d\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p><a href=\"https:\/\/start.spring.io\/\">start.spring.io<\/a>\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u53d6\u308a\u8fbc\u307f\u3001\u307b\u3068\u3093\u3069\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u884c\u3044\u307e\u3059\u3002generate\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001Spring Boot\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u751f\u6210\u3055\u308c\u3001zip\u5f62\u5f0f\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u89e3\u51cd\u3057\u3001\u4efb\u610f\u306eIDE\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>GridDB\u3068\u3084\u308a\u3068\u308a\u3059\u308b\u305f\u3081\u306b\u3001\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bGridDB Java Client\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002maven <code>pom.xml<\/code>\u306b\u4ee5\u4e0b\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3059\u308b\u3002 xml <dependency> <groupid>com.github.griddb<\/groupid> <artifactid>gridstore<\/artifactid> <version>5.3.0<\/version> <\/dependency> #\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u8a08<\/p>\n<h3>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u8a08<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001\u6a5f\u80fd\u8981\u4ef6\u306b\u5f93\u3063\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u3092\u66f8\u304d\u51fa\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u30af\u30e9\u30b9\u304c\u3042\u308a\u307e\u3059\uff1a * User<\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u5185\u306e\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\u3002\u4ee5\u4e0b\u306e\u5c5e\u6027\u3092\u6301\u3061\u307e\u3059\uff1a<\/p>\n<pre><code>*   `String id`: System generated unique identifier. It is the primary key.\n*   `String email`\n*   `String fullName`\n<\/code><\/pre>\n<ul>\n<li>\n<p>Blog<\/p>\n<p>\u3053\u306e\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306f\u30d6\u30ed\u30b0\u8a18\u4e8b\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u5c5e\u6027\u3092\u6301\u3061\u307e\u3059\uff1a<\/p>\n<ul>\n<li><code>String id<\/code>: System generated unique identifier. It is the primary key.<\/li>\n<li><code>String title<\/code>: The title of the blog post<\/li>\n<li><code>Integer voteUpCount<\/code>: The count of vote up<\/li>\n<li><code>Integer voteDownCount<\/code>: The count of votes down<\/li>\n<li><code>Date createdAt<\/code>: System-generated timestamp when the blog post created<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>VoteMetrics<\/p>\n<p>\u3053\u306e\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306f\u30d6\u30ed\u30b0\u8a18\u4e8b\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u5c5e\u6027\u3092\u6301\u3061\u307e\u3059\uff1a<\/p>\n<ul>\n<li><code>Date timestamp<\/code>: System generated. It is the primary key for the time series container (table).<\/li>\n<li><code>String blogId<\/code>: The blog ID voted by the user<\/li>\n<li><code>String userId<\/code>: The user ID makes voting<\/li>\n<li><code>Integer voteType<\/code>: The voting type, 1: Vote Up, 0: Vote Down <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>GridDB\u306b\u3088\u308b\u30c7\u30fc\u30bf\u30fb\u30a2\u30af\u30bb\u30b9<\/h4>\n<p>\u307e\u305a\u3001GridDB\u306e\u30c6\u30fc\u30d6\u30eb\u3084\u30b3\u30f3\u30c6\u30ca\u3092\u8868\u3059Java POJO\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002Lombok\u306e@Data\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u3068\u3001\u3059\u3079\u3066\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30b2\u30c3\u30bf\u30fc\u3001\u4fbf\u5229\u306atoString\u30e1\u30bd\u30c3\u30c9\u3001\u975e\u4e00\u6642\u7684\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308bhashCode\u3068equals\u306e\u5b9f\u88c5\u304c\u81ea\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u3059\u3079\u3066\u306e\u975e\u7d42\u7aef\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30bb\u30c3\u30bf\u30fc\u3068\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u3082\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8a2d\u8a08\u306b\u5f93\u3063\u3066\u30c7\u30fc\u30bf\u30fb\u30a2\u30af\u30bb\u30b9\u30fb\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n@Data\npublic class User {\n    @RowKey\n    String id;\n    String email;\n    String fullName;\n    Date createdAt;\n}\n\n@Data\npublic class Blog {\n    @RowKey\n    String id;\n    String title;\n    Integer voteUpCount;\n    Integer voteDownCount;\n    Date createdAt;\n}\n\n@Data\npublic class VoteMetrics {\n    @RowKey\n    Date timestamp;\n    String blogId;\n    String userId;\n    Integer voteType;\n}<\/code><\/pre>\n<\/div>\n<p>\u6b21\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u64cd\u4f5c\u306e\u4e2d\u5fc3\u7684\u306a\u8a2d\u5b9a\u3068\u3057\u3066 <code>GridDBConfig<\/code> \u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u306e\u30af\u30e9\u30b9\u306f\u4ee5\u4e0b\u306e\u3053\u3068\u3092\u884c\u3044\u307e\u3059\uff1a * GridDB\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3078\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306eGridStore\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30ca\u306f\u3001\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30fb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002* Collection\u306e\u4f5c\u6210\u30fb\u66f4\u65b0\u6642\u306b\u306f\u3001Collection\u306e\u30ab\u30e9\u30e0\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u5bfe\u5fdc\u3059\u308b\u540d\u524d\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u5404\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u5bfe\u3057\u3066\u3001\u983b\u7e41\u306b\u691c\u7d22\u3055\u308c\u3001TQL\u306eWHERE\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u6761\u4ef6\u3067\u4f7f\u7528\u3055\u308c\u308b\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n@Configuration\npublic class GridDBConfig {\n\n  @Value(\"${GRIDDB_NOTIFICATION_MEMBER}\")\n  private String notificationMember;\n\n  @Value(\"${GRIDDB_CLUSTER_NAME}\")\n  private String clusterName;\n\n  @Value(\"${GRIDDB_USER}\")\n  private String user;\n\n  @Value(\"${GRIDDB_PASSWORD}\")\n  private String password;\n\n  @Bean\n  public GridStore gridStore() throws GSException {\n    \/\/ Acquiring a GridStore instance\n    Properties properties = new Properties();\n    properties.setProperty(\"notificationMember\", notificationMember);\n    properties.setProperty(\"clusterName\", clusterName);\n    properties.setProperty(\"user\", user);\n    properties.setProperty(\"password\", password);\n    GridStore store = GridStoreFactory.getInstance().getGridStore(properties);\n    return store;\n  }\n\n  @Bean\n    public Collection&lt;String, User> userCollection(GridStore gridStore) throws GSException {\n        Collection&lt;String, User> collection = gridStore.putCollection(\"users\", User.class);\n        collection.createIndex(\"email\");\n        return collection;\n    }\n\n    @Bean\n    public Collection&lt;String, Blog> blogCollection(GridStore gridStore) throws GSException {\n        Collection&lt;String, Blog> collection = gridStore.putCollection(\"blogs\", Blog.class);\n        collection.createIndex(\"title\");\n        return collection;\n    }\n\n    @Bean\n    public TimeSeries&lt;votemetrics> voteMetricContainer(GridStore gridStore) throws GSException {\n        TimeSeries&lt;\/votemetrics>&lt;votemetrics> timeSeries = gridStore.putTimeSeries(Constant.VOTEMETRICS_CONTAINER, VoteMetrics.class);\n        timeSeries.createIndex(\"blogId\");\n        timeSeries.createIndex(\"userId\");\n        return timeSeries;\n    }\n}&lt;\/votemetrics><\/code><\/pre>\n<\/div>\n<h4>\u30b5\u30fc\u30d3\u30b9\u30fb\u30af\u30e9\u30b9<\/h4>\n<p>\u6b21\u306b\u3001\u30d3\u30b8\u30cd\u30b9\u30fb\u30ed\u30b8\u30c3\u30af\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e @Service \u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3064\u30b5\u30fc\u30d3\u30b9\u30fb\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3001Entity \u30af\u30e9\u30b9\u3092 DTO \u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n<p><code>BlogService.java<\/code>\u306f\u3001GridDB\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u306e\u691c\u7d22\u3068\u4f5c\u6210\u3092\u62c5\u5f53\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>create<\/code>: \u65b0\u3057\u3044\u30d6\u30ed\u30b0\u306e\u4f5c\u6210<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\npublic Blog create(CreateBlogRequest createBlogRequest) {\n    Blog blog = new Blog();\n    blog.setId(KeyGenerator.next(\"bl\"));\n    blog.setTitle(createBlogRequest.getTitle());\n    blog.setVoteDownCount(0);\n    blog.setVoteUpCount(0);\n    blog.setCreatedAt(new Date());\n    try {\n        blogCollection.put(blog);\n        blogCollection.commit();\n    } catch (GSException e) {\n        log.error(\"Error create blog\", e);\n    }\n    return blog;\n}<\/code><\/pre>\n<\/div>\n<ul>\n<li><code>fetchAll<\/code>:\u3059\u3079\u3066\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u3092\u53d6\u5f97<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n  public List&lt;blog> fetchAll() {\n      List&lt;\/blog>&lt;blog> blogs = new ArrayList&lt;>(0);\n      try {\n          Query&lt;\/blog>&lt;blog> query = blogCollection.query(\"SELECT *\", Blog.class);\n          RowSet&lt;\/blog>&lt;blog> rowSet = query.fetch();\n          while (rowSet.hasNext()) {\n              blogs.add(rowSet.next());\n          }\n      } catch (GSException e) {\n          log.error(\"Error fetchAll\", e);\n      }\n      return blogs;\n  }&lt;\/blog><\/code><\/pre>\n<\/div>\n<ul>\n<li><code>updateVoteUp<\/code>: \u3092\u4f7f\u7528\u3057\u3066\u3001\u6295\u7968\u30a2\u30c3\u30d7\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u884c\u3092\u53d6\u5f97\u3059\u308b\u969b\u306b\u3001<code>get(key, forUpdate)<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u66f4\u65b0\u3057\u305f\u3044\u884c\u3092\u30ed\u30c3\u30af\u3057\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u5b8c\u4e86\u3059\u308b\u304b\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u304c\u767a\u751f\u3059\u308b\u307e\u3067\u4ed6\u306e\u66f4\u65b0\u64cd\u4f5c\u3092\u5f85\u305f\u305b\u307e\u3059\u3002<\/li>\n<\/ul>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n  public void updateVoteUp(String blogId) throws GSException {\n      blogCollection.setAutoCommit(false);\n      Blog blog = blogCollection.get(blogId, true);\n      blog.setVoteUpCount(blog.getVoteUpCount() + 1);\n      blogCollection.put(blog);\n      blogCollection.commit();\n  }<\/code><\/pre>\n<\/div>\n<p>\u6295\u7968\u30e1\u30c8\u30ea\u30af\u30b9\u306e\u884c\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nVoteMetrics(timestamp=Sun Jan 21 03:48:10 GMT 2024, blogId=bl_0EWG3KRE8H95G, userId=us_0EWQES1BVRJAN, voteType=1)\nVoteMetrics(timestamp=Sun Jan 21 03:48:03 GMT 2024, blogId=bl_0EWG3KRDCHBEM, userId=us_0EWQER8KKRHDF, voteType=1)\nVoteMetrics(timestamp=Sun Jan 21 03:48:02 GMT 2024, blogId=bl_0EWQ49HPKRKWB, userId=us_0EWQER2KVRJCJ, voteType=1)\nVoteMetrics(timestamp=Sun Jan 21 03:48:00 GMT 2024, blogId=bl_0EWG3KRE8H95G, userId=us_0EWQEQV6FRKKV, voteType=1)<\/code><\/pre>\n<\/div>\n<h3>Spring MVC\u3067Web\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u6271\u3046<\/h3>\n<p>Spring\u306eWeb MVC\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f\u3001\u4ed6\u306e\u591a\u304f\u306eWeb MVC\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u540c\u69d8\u306b\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u99c6\u52d5\u578b\u3067\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306b\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1\u3057\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u3092\u5bb9\u6613\u306b\u3059\u308b\u4ed6\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u4e2d\u592e\u306eServlet\u3092\u4e2d\u5fc3\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002Spring MVC\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\uff1a * Spring MVC\u306f\u3001\u30e2\u30c7\u30eb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3001\u30b3\u30de\u30f3\u30c9\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u30d3\u30e5\u30fc\u30ea\u30be\u30eb\u30d0\u306a\u3069\u3001\u305d\u308c\u305e\u308c\u306e\u5f79\u5272\u3092\u7279\u5316\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u5b9f\u73fe\u3067\u304d\u308b\u3088\u3046\u306b\u5206\u96e2\u3057\u3066\u3044\u307e\u3059\u3002* \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u3068\u30c7\u30d7\u30ed\u30a4\u306b\u8efd\u91cf\u306a\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002* \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30af\u30e9\u30b9\u306e\u4e21\u65b9\u306b\u5805\u7262\u306a\u30b3\u30f3\u30d5\u30a3\u30ae\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u3001\u30a6\u30a7\u30d6\u30fb\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u304b\u3089\u30d3\u30b8\u30cd\u30b9\u30fb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u3088\u3046\u306a\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u8d8a\u3048\u305f\u5bb9\u6613\u306a\u53c2\u7167\u3092\u542b\u307f\u307e\u3059\u3002* \u30da\u30fc\u30b8\u3092\u7c21\u5358\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u7279\u5b9a\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u6a19\u6e96\u7684\u306aMVC\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u5f93\u3044\u307e\u3059\u3002\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9 (<code>VotesController<\/code> \u30af\u30e9\u30b9)\u3001\u30d3\u30e5\u30fc (<code>votes.html<\/code> Thymeleaf \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)\u3001\u305d\u3057\u3066\u30d3\u30e5\u30fc\u306b\u30c7\u30fc\u30bf\u3092\u6e21\u3059\u305f\u3081\u306e\u30e2\u30c7\u30eb (Java \u30de\u30c3\u30d7\u30aa\u30d6\u30b8\u30a7\u30af\u30c8) \u3092\u7528\u610f\u3057\u307e\u3059\u3002\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u5404\u30e1\u30bd\u30c3\u30c9\u306f URI \u306b\u30de\u30c3\u30d7\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>\u6295\u7968\u30da\u30fc\u30b8<\/h4>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001<code>VotesController<\/code> \u306e\u30e1\u30bd\u30c3\u30c9 <code>votes<\/code> \u306f <code>\/votes<\/code> \u306b\u5bfe\u3059\u308b GET \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3057\u3066\u30d3\u30e5\u30fc\u540d (\u3053\u306e\u5834\u5408\u306f <code>votes<\/code>) \u3092\u8fd4\u3057\u3001<code>addAttribute<\/code> \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066 <code>Model<\/code> \u306b\u5c5e\u6027 <code>blogs<\/code> \u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n@Controller\n@RequestMapping(\"\/votes\")\npublic class VotesController {\n    \n  @GetMapping\n  String votes(Model model) {\n      List&lt;blog> blogs = blogService.fetchAll();\n      model.addAttribute(\"blogs\", blogs);\n      return \"votes\";\n  }\n\n  @GetMapping(\"\/up\/{id}\")\n    public String voteUp(@PathVariable(\"id\") String blogId, Model model, RedirectAttributes redirectAttributes) {\n        try {\n            String userId = KeyGenerator.next(\"us\");\n            voteService.voteUp(blogId, userId);\n            redirectAttributes.addFlashAttribute(\"message\", \"Voting successful!\");\n        } catch (Exception e) {\n            redirectAttributes.addFlashAttribute(\"message\", \"Oh no!\");\n        }\n        return \"redirect:\/votes\";\n    }\n}\n&lt;\/blog><\/code><\/pre>\n<\/div>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u306f\u3001\u751f\u6210\u3059\u308b\u30d3\u30e5\u30fc\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u79c1\u305f\u3061\u306f <code>Thymeleaf<\/code> \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002Thymeleaf \u306f\u6700\u65b0\u306e\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9Java\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3\u3067\u3001\u30a6\u30a7\u30d6\u74b0\u5883\u3068\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u74b0\u5883\u306e\u4e21\u65b9\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002Thymeleaf\u3067\u66f8\u304b\u308c\u305fHTML\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306fHTML\u306e\u3088\u3046\u306b\u898b\u3048\u3001\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30ed\u30b0\u8a18\u4e8b\u306e\u30ea\u30b9\u30c8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306bHTML\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3057\u3001\u30d6\u30ed\u30b0\u8a18\u4e8b\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u7e70\u308a\u8fd4\u3057\u8868\u793a\u3059\u308b\u305f\u3081\u306b<code>th:each<\/code>\u30bf\u30b0\u5c5e\u6027\u3092\u4f7f\u7528\u3057\u3001\u5024\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b<code>th:text<\/code>\u30bf\u30b0\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-html\">\n  &lt;tbody&gt;\n      &lt;tr th_each=\"blog : ${blogs}\"&gt;\n          &lt;th scope=\"row\"&gt;[[${blog.title}]]&lt;\/th&gt;\n          &lt;td&gt;\n              &lt;a th_href=\"@{'\/votes\/up\/' + ${blog.id}}\" title=\"Vote Up\" class=\"btn btn-outline-success\"\n                  role=\"button\"&gt;\n                  &lt;i class=\"fa fa-thumbs-up\"&gt;&lt;\/i&gt;\n                  &lt;span type=\"text\" th_text=\"${blog.voteUpCount}\" class=\"btn-label\"&gt;&lt;\/span&gt;\n              &lt;\/a&gt;\n          &lt;\/td&gt;\n          &lt;td&gt;\n              &lt;a th_href=\"@{'\/votes\/down\/' + ${blog.id}}\" title=\"Vote Down\" class=\"btn btn-outline-danger\"\n                  role=\"button\"&gt;\n                  &lt;i class=\"fa fa-thumbs-down\"&gt;&lt;\/i&gt;\n                  &lt;span type=\"text\" th_text=\"${blog.voteDownCount}\" class=\"btn-label\"&gt;&lt;\/span&gt;\n              &lt;\/a&gt;\n          &lt;\/td&gt;\n\n          &lt;td&gt;[[${blog.createdAt}]]&lt;\/td&gt;\n      &lt;\/tr&gt;\n  &lt;\/tbody&gt;<\/code><\/pre>\n<\/div>\n<p>\u6295\u7968\u30da\u30fc\u30b8\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u3059\u3002\u30e6\u30fc\u30b6\u306f<code>\u30b5\u30e0\u30ba\u30a2\u30c3\u30d7\/\u30c0\u30a6\u30f3<\/code>\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u6295\u7a3f\u3092\u4e0a\u4e0b\u306b\u6295\u7968\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/votes_page.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/votes_page.png\" alt=\"\" width=\"1448\" height=\"795\" class=\"aligncenter size-full wp-image-30026\" srcset=\"\/wp-content\/uploads\/2024\/03\/votes_page.png 1448w, \/wp-content\/uploads\/2024\/03\/votes_page-300x165.png 300w, \/wp-content\/uploads\/2024\/03\/votes_page-1024x562.png 1024w, \/wp-content\/uploads\/2024\/03\/votes_page-768x422.png 768w, \/wp-content\/uploads\/2024\/03\/votes_page-600x329.png 600w\" sizes=\"(max-width: 1448px) 100vw, 1448px\" \/><\/a><\/p>\n<h4>\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u30fb\u30da\u30fc\u30b8<\/h4>\n<p>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u9001\u4fe1\u30a4\u30d9\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u9001\u4fe1\u30a4\u30d9\u30f3\u30c8\u3092\u4f7f\u3046\u3068\u3001\u30b5\u30fc\u30d0\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3053\u3068\u3067\u3001\u3044\u3064\u3067\u3082\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u3092\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u306b\u9001\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u53d7\u4fe1\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u3001\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u5185\u3067\u30a4\u30d9\u30f3\u30c8 + \u30c7\u30fc\u30bf\u3068\u3057\u3066\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u53d7\u4fe1\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306b\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u63a5\u7d9a\u3092\u958b\u304f\u306b\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u3092\u751f\u6210\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e URL(<code>\/votes\/chart-data<\/code>)\u3067\u65b0\u3057\u3044 EventSource \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">script\nconst ctx = document.getElementById('charts');\nconst voteChart = new Chart(ctx, config);\n\/* A small decorator for the JavaScript EventSource API that automatically reconnects *\/\nconst eventSource = new ReconnectingEventSource(\"\/votes\/chart-data\");<\/code><\/pre>\n<\/div>\n<p>\u3053\u3053\u3067\u306f\u3001EventSource\u304c\u30e1\u30c3\u30bb\u30fc\u30b8\u30fb\u30a4\u30d9\u30f3\u30c8\u306e\u53d7\u4fe1\u3092\u30ea\u30c3\u30b9\u30f3\u3057\u3001\u30c1\u30e3\u30fc\u30c8\u30fb\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">script\neventSource.onmessage = function (event) {\n    console.log(\"Received event: \" + event.data);\n    const data = JSON.parse(event.data);\n    config.data.labels.splice(0, config.data.labels.length, ...data.map(row => row.label));\n    config.data.datasets[0].data.splice(0, config.data.datasets[0].data.length, ...data.map(row => row.count));\n    voteChart.update();\n};<\/code><\/pre>\n<\/div>\n<p>\u30a4\u30d9\u30f3\u30c8\u3092\u9001\u308b\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001MIME\u30bf\u30a4\u30d7text\/event-stream\u3092\u4f7f\u3063\u3066\u5fdc\u7b54\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u5404\u901a\u77e5\u306f\u6539\u884c\u3067\u7d42\u4e86\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u30d6\u30ed\u30c3\u30af\u3068\u3057\u3066\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n@GetMapping(\"\/chart-data\")\npublic SseEmitter streamSseMvc(@RequestHeader Map&lt;String, String> headers) {\n    SseEmitter emitter = new SseEmitter(Duration.ofMinutes(15).toMillis());\n    ExecutorService sseMvcExecutor = Executors.newSingleThreadExecutor();\n    sseMvcExecutor.execute(() -> {\n        try {\n            for (int i = 0; true; i++) {\n                SseEventBuilder event = SseEmitter.event()\n                        .data(voteMetricService.getVoteAggregateOverTime())\n                        .id(eventId);\n                emitter.send(event);\n                Thread.sleep(Duration.ofSeconds(30).toMillis());\n            }\n        } catch (Exception ex) {\n            emitter.completeWithError(ex);\n        }\n        emitter.complete();\n    });\n    return emitter;\n}<\/code><\/pre>\n<\/div>\n<p>\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001SseEmitter\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u306b\u306a\u308b\u307e\u3067\u6c38\u9060\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u306f30\u79d2\u3054\u3068\u306b\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime.png\" alt=\"\" width=\"1441\" height=\"778\" class=\"aligncenter size-full wp-image-30027\" srcset=\"\/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime.png 1441w, \/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime-300x162.png 300w, \/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime-1024x553.png 1024w, \/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime-768x415.png 768w, \/wp-content\/uploads\/2024\/03\/votescount_dashboard_realtime-600x324.png 600w\" sizes=\"(max-width: 1441px) 100vw, 1441px\" \/><\/a><\/p>\n<p>SSE\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304b\u3089\u306e\u5fdc\u7b54\uff1a<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/sse_eventstream.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/sse_eventstream.png\" alt=\"\" width=\"1481\" height=\"211\" class=\"aligncenter size-full wp-image-30025\" srcset=\"\/wp-content\/uploads\/2024\/03\/sse_eventstream.png 1481w, \/wp-content\/uploads\/2024\/03\/sse_eventstream-300x43.png 300w, \/wp-content\/uploads\/2024\/03\/sse_eventstream-1024x146.png 1024w, \/wp-content\/uploads\/2024\/03\/sse_eventstream-768x109.png 768w, \/wp-content\/uploads\/2024\/03\/sse_eventstream-600x85.png 600w\" sizes=\"(max-width: 1481px) 100vw, 1481px\" \/><\/a><\/p>\n<h3>Docker Compose\u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5b9f\u884c<\/h3>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7acb\u3061\u4e0a\u3052\u308b\u305f\u3081\u306b\u3001\u4e00\u822c\u7684\u306a\u30b3\u30f3\u30c6\u30ca\u30fb\u30a8\u30f3\u30b8\u30f3\u3067\u3042\u308bDocker\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30ca\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u3069\u306e\u30de\u30b7\u30f3\u3067\u3082\u671f\u5f85\u901a\u308a\u306b\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002Docker\u3067\u306f\u3001\u8907\u6570\u306e\u30b3\u30f3\u30c6\u30ca\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4e00\u7dd2\u306b\u30aa\u30fc\u30b1\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3042\u308bDocker Compose\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001dockerfile\u3092\u4f5c\u6210\u3057\u307e\u3059\uff1a dev.Dockerfile`\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002JDK21\u306eMaven docker\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nFROM maven:3.9.5-eclipse-temurin-21-alpine\nRUN mkdir \/app\nWORKDIR \/app\n\nCOPY pom.xml .\/\nRUN mvn dependency:go-offline\n\nCOPY docker-entrypoint-dev.sh .\/\nCOPY src .\/src<\/code><\/pre>\n<\/div>\n<p>\u6b21\u306b\u3001docker entry-point \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\uff1a docker-entrypoint-dev.sh`\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3001\u30b3\u30fc\u30c9\u304c\u5909\u66f4\u3055\u308c\u308b\u305f\u3073\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\n#!\/bin\/bash\nexport TERM=xterm\necho \"wait 5s\"\nsleep 5\n\nmvn spring-boot:run -Dspring-boot.run.jvmArguments=\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005\" &\n\nwhile true; do\n    watch -d -t -g \"ls -lR . | sha1sum\" && mvn compile\ndone<\/code><\/pre>\n<\/div>\n<p>\u6700\u5f8c\u306b\u3001docker-compose\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\uff1a docker-compose-dev.yml`\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nversion: '3.3'\nservices:\n  app-dev:\n    container_name: blogvotingapp-dev\n    build:\n      context: .\/\n      dockerfile: dev.Dockerfile\n    volumes:\n      - .\/src:\/app\/src\n      - .\/.m2:\/root\/.m2\n    environment:\n      - GRIDDB_NOTIFICATION_MEMBER=griddb-dev:10001\n      - GRIDDB_CLUSTER_NAME=dockerGridDB\n      - GRIDDB_USER=admin\n      - GRIDDB_PASSWORD=admin\n      - spring.thymeleaf.prefix=file:src\/main\/resources\/templates\/\n    command: sh .\/docker-entrypoint-dev.sh\n    ports:\n      - 8080:8080\n      - 35729:35729\n      - 5005:5005\n    networks:\n      - griddbvoting-dev-net\n    depends_on:\n      - griddb-dev\n  griddb-dev:\n    container_name: griddbvoting-dev\n    build:\n      context: .\/griddbdocker\n      dockerfile: Dockerfile531\n    volumes:\n      - griddbvoting-dev-vol:\/var\/lib\/gridstore\n    ports:\n      - 10001:10001\n      - 20001:20001\n    networks:\n      - griddbvoting-dev-net\n\nnetworks:\n  griddbvoting-dev-net:\nvolumes:\n  griddbvoting-dev-vol:<\/code><\/pre>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30c9\u30c3\u30ab\u30fc\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff1a<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\n  docker compose -f docker-compose-dev.yml build<\/code><\/pre>\n<\/div>\n<p>Docker\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u305f\u3089\u3001\u4eca\u5ea6\u306f\u305d\u308c\u3092\u5b9f\u884c\u3057\u307e\u3059\uff1a<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\n  docker compose -f docker-compose-dev.yml up up<\/code><\/pre>\n<\/div>\n<p>\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306f http:\/\/localhost:8080 \u3067\u6e96\u5099\u5b8c\u4e86\u3067\u3059<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Spring Boot\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066GridDB\u3092\u4f7f\u3063\u3066\u6295\u7968\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001Docker Compose\u3092\u4f7f\u3063\u3066Spring Boot\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3059\u308b\u65b9\u6cd5\u3082\u5b66\u3073\u307e\u3057\u305f\u3002Spring Boot\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Docker\u5316\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30d7\u30ed\u30a4\u30d7\u30ed\u30bb\u30b9\u304c\u5927\u5e45\u306b\u7c21\u7d20\u5316\u3055\u308c\u3001\u69d8\u3005\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u4e00\u8cab\u3057\u305f\u74b0\u5883\u304c\u4fdd\u8a3c\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u305d\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092Docker\u30a4\u30e1\u30fc\u30b8\u306b\u30ab\u30d7\u30bb\u30eb\u5316\u3059\u308b\u3053\u3068\u3067\u3001\u6f5c\u5728\u7684\u306a\u4e00\u8cab\u6027\u3068\u7af6\u5408\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u6295\u7968\u30d7\u30ed\u30bb\u30b9\u5168\u4f53\u3092\u4fc3\u9032\u3059\u308b\u305f\u3081\u306b\u6700\u5148\u7aef\u306e\u6280\u8853\u3092\u6d3b\u7528 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":49672,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50896","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/voting-web-platform\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/voting-web-platform\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-27T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:56:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1794\" \/>\n\t<meta property=\"og:image:height\" content=\"1794\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9\",\"datePublished\":\"2024-03-27T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:56:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/\"},\"wordCount\":214,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/\",\"name\":\"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg\",\"datePublished\":\"2024-03-27T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:56:40+00:00\",\"description\":\"\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg\",\"width\":1794,\"height\":1794},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9 | GridDB: Open Source Time Series Database for IoT","description":"\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/voting-web-platform\/","og_locale":"ja_JP","og_type":"article","og_title":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9 | GridDB: Open Source Time Series Database for IoT","og_description":"\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/voting-web-platform\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2024-03-27T07:00:00+00:00","article_modified_time":"2025-11-14T15:56:40+00:00","og_image":[{"width":1794,"height":1794,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9","datePublished":"2024-03-27T07:00:00+00:00","dateModified":"2025-11-14T15:56:40+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/"},"wordCount":214,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/","name":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30d6\u30ed\u30b0\u6295\u7968\u30a6\u30a7\u30d6\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u69cb\u7bc9 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg","datePublished":"2024-03-27T07:00:00+00:00","dateModified":"2025-11-14T15:56:40+00:00","description":"\u30aa\u30f3\u30e9\u30a4\u30f3\u6295\u7968\u30b7\u30b9\u30c6\u30e0\u3068\u306f\u3001\u76f4\u611f\u7684\u3067\u5b89\u5168\u306a\u30aa\u30f3\u30e9\u30a4\u30f3\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u3063\u3066\u3001\u4eba\u3005\u304c\u96fb\u5b50\u7684\u306b\u6295\u7968\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b7","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/voting-web-platform\/#primaryimage","url":"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg","contentUrl":"\/wp-content\/uploads\/2024\/03\/chrome_EKcj8OPSD4.jpg","width":1794,"height":1794},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50896"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50896\/revisions"}],"predecessor-version":[{"id":51717,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50896\/revisions\/51717"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/49672"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}