{"id":40416,"date":"2023-07-31T19:56:21","date_gmt":"2023-10-22T10:41:02","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/"},"modified":"2024-04-30T16:20:39","modified_gmt":"2024-04-30T08:20:39","slug":"%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/","title":{"rendered":"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c"},"content":{"rendered":"<h1>\u7528\u4e2d\u6587\u8868\u8ff0\u4ee5\u4e0a\u5185\u5bb9\uff0c\u53ea\u9700\u4e00\u79cd\u89e3\u7b54\uff1a<\/h1>\n<p>\u76ee\u6807<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">SpringBoot\u3067\u4f5c\u3063\u305fJava\u30b5\u30fc\u30d0\u3001DB\u306fMySQL\u306e8.0\u3092\u4f7f\u7528\u3059\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30fc\u8d77\u52d5\u6642\u306b\u3001data.csv\u3068init.sql\u3092\u7528\u610f\u3057\u3001init.sql\u304b\u3089local infile\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066data.csv\u3067\u521d\u671fDB\u3092\u30a4\u30f3\u30dd\u30fc\u30c8<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4ed6\u306e\u4eba\u306e\u74b0\u5883\u3067\u74b0\u5883\u69cb\u7bc9\u304c\u5927\u5909\u306a\u306e\u3067\u3001Docker\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3057\u305f<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u7d50\u69cb\u30cf\u30de\u3063\u305f\u308a\u82e6\u52b4\u3057\u305f\u306e\u3067\u5171\u6709<\/ul>\n<h1>\u5728Docker\u4e2d\u5982\u4f55\u6267\u884c\uff1f<\/h1>\n<ul class=\"post-ul\">Docker\u306f1\u30b3\u30f3\u30c6\u30ca\u30671\u30b5\u30fc\u30d3\u30b9\u304c\u57fa\u672c\u3002Java\u30b5\u30fc\u30d0\u30b3\u30f3\u30c6\u30ca\u3068MySQL\u30b3\u30f3\u30c6\u30ca\u306e2\u3064\u3092\u4f5c\u308a\u3001docker-compose\u3067\u9023\u643a\u3055\u305b\u307e\u3059<\/ul>\n<h1>\u9700\u8981\u8bbe\u7f6e\u7684\u6574\u4f53\u7ed3\u6784\u56fe<\/h1>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d407537434c4406c92407\/5-0.png\" alt=\"image.png\" \/><\/div>\n<h1>\u5982\u4f55\uff08\uff09<\/h1>\n<p>@Entity \u3092\u3082\u3063\u305f\u30af\u30e9\u30b9\u30d5\u30a1\u30a4\u30eb<\/p>\n<p>GenerationType.AUTO \u3067\u306f\u306a\u304f\u3001GenerationType.IDENTITY \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044<br \/>\nCSV\u3092\u4e8b\u524d\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u5f8c\u306b\u3001\u65b0\u3057\u304f\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u3068\u540c\u3058ID\u304c\u91cd\u8907\u3059\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3059<\/p>\n<pre class=\"post-pre\"><code>@Entity\r\n@Table(name=\"shohin\")\r\npublic class MyData {\r\n    @Id\r\n    @GeneratedValue(strategy = GenerationType.IDENTITY)\r\n    @Column(nullable = true, unique = true)\r\n    private Integer id;\r\n\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">application.yml<\/ul>\n<\/li>\n<\/ul>\n<p>\u4e0a\u304c\u30ed\u30fc\u30ab\u30eb\u3067\u56de\u3059\u3068\u304d\u3001\u4e0b\u304cdocker-compose\u3067\u56de\u3059\u3068\u304d\u306e\u8a2d\u5b9a\u3067\u3059<br \/>\n\u30ed\u30fc\u30ab\u30eb\u306eurl\u304c\u9577\u3044\u306e\u306f\u3001\u4f55\u304b\u3068\u30a8\u30e9\u30fc\u304c\u3067\u3066\u5bfe\u7b56\u3092\u5165\u308c\u305f\u7d50\u679c\u3067\u3059<\/p>\n<pre class=\"post-pre\"><code>server:\r\n  port: 8081\r\n\r\n---\r\nspring:\r\n  datasource:\r\n    driverClassName: com.mysql.cj.jdbc.Driver\r\n    password: hogehoge\r\n    url: jdbc:mysql:\/\/localhost:3306\/hogehoge_db?allowPublicKeyRetrieval=true&amp;useSSL=FALSE&amp;characterEncoding=UTF-8&amp;serverTimezone=JST\r\n    username: hoge\r\n  jpa:\r\n    database: MYSQL\r\n    hibernate:\r\n      ddl-auto: update\r\n\r\n---\r\nspring:\r\n  profiles: docker-compose\r\n  datasource:\r\n    url: jdbc:mysql:\/\/dbserver\/hogehoge_db\r\n    username: hoge\r\n    password: hogehoge\r\n    driver-class-name: com.mysql.cj.jdbc.Driver\r\n  jpa:\r\n    hibernate:\r\n      ddl-auto: update\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">my.cnf<\/ul>\n<\/li>\n<\/ul>\n<p>MySQL8.0\u304b\u3089\u300cload data local infile\u300d\u30b3\u30de\u30f3\u30c9\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u30aa\u30d5\u306b\u306a\u308a\u307e\u3057\u305f\u3002local_infile=1\u3067\u6709\u52b9\u306b\u3057\u307e\u3059<br \/>\n\u307e\u305f\u3001Windows Pro\u306e\u74b0\u5883\u306eDocker\u306a\u3089\u3070\u3053\u306e\u307e\u307e\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001Home\u74b0\u5883\u3060\u3068\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3777\u306e\u30d5\u30a1\u30a4\u30eb\u306fMySQL8.0\u304c\u8aad\u307f\u306b\u3044\u304b\u306a\u3044\u306e\u3067\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u5909\u66f4\u3057\u3066\u304a\u304d\u307e\u3059<\/p>\n<p>[Warning] World-writable config file &#8216;\/etc\/mysql\/conf.d\/my.cnf&#8217; is ignored<\/p>\n<p>\u6587\u5b57\u30b3\u30fc\u30c9\u3082\u8abf\u6574\u3057\u3066\u304a\u304d\u307e\u3059<\/p>\n<pre class=\"post-pre\"><code>[mysqld]\r\ncharacter-set-server=utf8\r\nlocal_infile=1\r\n\r\n[mysql]\r\ndefault-character-set=utf8\r\n\r\n[client]\r\ndefault-character-set=utf8\r\nlocal_infile=1\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">init.sql<\/ul>\n<\/li>\n<\/ul>\n<p>docker-compose up &#8211;build \u30b3\u30de\u30f3\u30c9\u3092\u53e9\u3044\u305f\u3068\u304d\u30011\u56de\u76ee\u306b\u547c\u3070\u308c\u308bSQL\u3067\u3059<br \/>\nID\u306b\u306f\u300cid int AUTO_INCREMENT PRIMARY KEY\u300d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 @Entity \u3067\u6307\u5b9a\u3057\u305f\u30ab\u30e9\u30e0\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>use hogehoge_db;\r\nCREATE TABLE shohin(hogehoge);\r\nload data local infile '\/docker-entrypoint-initdb.d\/data.csv' INTO TABLE sector FIELDS TERMINATED BY ',';\r\nselect * from shohin;\r\n<\/code><\/pre>\n<ul class=\"post-ul\">mysql\/Dockerfile<\/ul>\n<pre class=\"post-pre\"><code>FROM mysql:8.0\r\nRUN touch \/var\/log\/mysql\/mysqld.log\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d407537434c4406c92407\/17-0.png\" alt=\"image.png\" \/><\/div>\n<pre class=\"post-pre\"><code>FROM openjdk:jdk-alpine\r\nVOLUME \/tmp\r\nRUN mkdir \/app\r\nWORKDIR \/app\r\nENV JAR_TARGET \"hogehoge-0.0.1-SNAPSHOT.jar\"\r\nENTRYPOINT [\"sh\",\"-c\",\"java -jar -Dspring.profiles.active=docker-compose .\/build\/libs\/${JAR_TARGET}\"]\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">docker-compose.yml<\/ul>\n<\/li>\n<\/ul>\n<p>\u30c7\u30fc\u30bf\u306e\u6c38\u7d9a\u5316\u3092\u3059\u308b\u3068\u3001mysql\u30b3\u30f3\u30c6\u30ca\u306b\u30c7\u30fc\u30bf\u304c\u6b8b\u3089\u306a\u304f\u306a\u308a\u3001\u5f8c\u3005CSV\u3092\u8aad\u307f\u8fbc\u3080\u3068\u304d\u9762\u5012\u3060\u3063\u305f\u306e\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8<br \/>\nmysql\u30b3\u30f3\u30c6\u30ca\u3092 docker rm hogehoge \u7b49\u3067\u524a\u9664\u3057\u306a\u3044\u9650\u308a\u306f\u6b8b\u308a\u307e\u3059\u306e\u3067\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n<pre class=\"post-pre\"><code>version: \"3\"\r\nservices:\r\n  dbserver:\r\n    container_name: mysql8.0_hogehoge_db\r\n    image: mysql:8.0\r\n    environment:\r\n      MYSQL_DATABASE: hogehoge_db\r\n      MYSQL_USER: hoge\r\n      MYSQL_PASSWORD: hogehoge\r\n      MYSQL_ROOT_PASSWORD: hogehogehoge\r\n    expose:\r\n      - 3307\r\n    ports:\r\n      - 3307:3307\r\n    volumes:\r\n      # \u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\r\n      - .\/docker-compose\/mysql\/initdb:\/docker-entrypoint-initdb.d\r\n      # MySQL\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\r\n      - .\/docker-compose\/mysql\/config:\/etc\/mysql\/conf.d\r\n      # DB\u306e\u6c38\u7d9a\u5316 \u30a2\u30d7\u30ea\u30b3\u30f3\u30c6\u30ca\u3001DB\u30b3\u30f3\u30c6\u30ca\u3092\u6d88\u3057\u3066\u3082\u6b8b\u308a\u7d9a\u3051\u308b\u3002\u4eca\u56de\u306fCSV\u3092\u8aad\u307f\u305f\u3044\u306e\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3002\u30b3\u30f3\u30c6\u30ca\u6d88\u3059\u3068DB\u6d88\u3048\u308b\u304b\u3089\u6ce8\u610f\u3057\u308d\u306a\uff01\r\n      #- mysql_db:\/var\/lib\/mysql\r\n      # log\u306e\u51fa\u529b\r\n      - .\/log\/mysql:\/var\/log\/mysql\r\n  app:\r\n    container_name: hogehoge_app\r\n    build: .\/docker-compose\/spring\r\n    depends_on:\r\n      - dbserver\r\n    ports:\r\n      - \"8081:8081\"\r\n    volumes:\r\n      - .:\/app\r\n    environment:\r\n      # mysql\u306e\u63a5\u7d9a\u8a2d\u5b9a host:port\u306f\u30b3\u30f3\u30c6\u30ca\u540d\u6307\u5b9a\r\n      spring.datasource.driverClassName: \"com.mysql.cj.jdbc.Driver\"\r\n      spring.datasource.url: \"jdbc:mysql:\/\/dbserver\/hogehoge_db\"\r\n      spring.datasource.username: \"hoge\"\r\n      spring.datasource.password: \"hogehoge\"\r\n# DB\u306e\u6c38\u7d9a\u5316\u5148\r\nvolumes:\r\n  mysql_db:\r\n    driver: local\r\n\r\n<\/code><\/pre>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">build.gradle<\/ul>\n<\/li>\n<\/ul>\n<p>dependencies\u306bmysql\u3092\u8ffd\u52a0\u3002\u4ee5\u4e0b\u30b5\u30f3\u30d7\u30eb<\/p>\n<pre class=\"post-pre\"><code>dependencies {\r\n    implementation 'org.springframework.boot:spring-boot-starter'\r\n    testImplementation('org.springframework.boot:spring-boot-starter-test') {\r\n        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'\r\n    }\r\n    compile 'org.springframework.boot:spring-boot-starter-web'\r\n    compile 'org.springframework.boot:spring-boot-starter-thymeleaf'\r\n    compile 'org.springframework.boot:spring-boot-devtools'\r\n    compile('org.springframework.boot:spring-boot-starter-data-jpa')\r\n    runtime('mysql:mysql-connector-java')\r\n}\r\n<\/code><\/pre>\n<h1>\u5728\u8fdb\u884cgit\u5206\u53d1\u65f6<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\/build\/libs\u306e\u4e2d\u306ejar\u304c\u30c7\u30d5\u30a9\u30eb\u30c8gitignore\u306b\u5165\u3063\u3066\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001git\u3067\u7ba1\u7406\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306ejar\u3092\u5143\u306b\u56de\u308b\u305f\u3081<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">readme\u306b\u3001mysql\\config \u306emy.cnf\u3092\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u3059\u308b\u3088\u3046\u306b\u8a18\u8f09\u3057\u3066\u304f\u3060\u3055\u3044<\/ul>\n<h1>\u51c6\u5907Docker<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306eWindows\u306e\u7528\u610f<\/ul>\n<\/li>\n<\/ul>\n<p>docker desktop\u306e\u8a2d\u5b9a\u3092\u958b\u304d\u3001Resources\u2192File Sharing\u3067C\u30c9\u30e9\u30a4\u30d6\u3092\u8ffd\u52a0\u3059\u308b<br \/>\nhttps:\/\/qiita.com\/kikako\/items\/7b6301a140cf37a5b7ac<\/p>\n<h1>\u5728docker\u4e0a\u8fd0\u884c<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u306e\u30d5\u30a1\u30a4\u30eb\u3088\u308apowershell\u3092\u7ba1\u7406\u8005\u3067\u8d77\u52d5\uff08\u7ba1\u7406\u8005\u6a29\u9650\u304c\u3042\u308b\u30e6\u30fc\u30b6\u306a\u3089\u666e\u901a\u306epowershell\u3067\u3088\u3044\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">docker-compose up &#8211;build<\/ul>\n<\/li>\n<\/ul>\n<p>\u305d\u306e\u5f8c\u53f3\u4e0b\u306b\u8b66\u544a\u304c\u3067\u305f\u3089 share it \u30922\u56de\u62bc\u4e0b\u30022\u56de\u3067\u308b\u304d\u304c\u3059\u308b<br \/>\nCtrl C\u3067\u6b62\u3081\u3089\u308c\u308b\u304c\u3001\u6016\u3044\u306a\u3089 docker-compose up &#8211;build -d \u3067\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u5b9f\u884c<\/p>\n<p>down\u53e9\u304f\u307e\u3067\u52d5\u304d\u7d9a\u3051\u308b<\/p>\n<p>\u7d42\u308f\u3089\u305b\u308b\u3068\u304d\u306f\u540c\u4e00\u30d5\u30a9\u30eb\u30c0\u3067 docker-compose down<br \/>\n1\u56de\u76ee\u306f\u30a2\u30d7\u30ea\u8d77\u52d5\u6642\u306bSQL\u304c\u5b9f\u884c\u3055\u308c\u3066\u304a\u3089\u305a\u3001\u8d77\u52d5\u306b\u5931\u6557\u3059\u308b\u3068\u601d\u3046\u30022\u56de\u76ee\u306b\u8d77\u52d5\u6210\u529f\u3057\u307e\u3059<\/p>\n<h1>\u5728\u7b2c\u4e8c\u6b21\u5bfc\u5165CSV\u6587\u4ef6\u65f6\uff0c\u5220\u9664\u73b0\u6709\u7684\u6570\u636e\u5e93\u7b49\u3002<\/h1>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d407537434c4406c92407\/30-0.png\" alt=\"image.png\" \/><\/div>\n<pre class=\"post-pre\"><code>    * \u5168\u30b3\u30f3\u30c6\u30ca\u505c\u6b62: docker stop $(docker ps -q)\r\n    * \u5168\u30b3\u30f3\u30c6\u30ca\u524a\u9664\uff1adocker rm $(docker ps -q -a)\r\n    * \u5168\u30a4\u30e1\u30fc\u30b8\u524a\u9664: docker rmi $(docker images -q)\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7528\u4e2d\u6587\u8868\u8ff0\u4ee5\u4e0a\u5185\u5bb9\uff0c\u53ea\u9700\u4e00\u79cd\u89e3\u7b54\uff1a \u76ee\u6807 SpringBoot\u3067\u4f5c\u3063\u305fJava\u30b5\u30fc\u30d0\u3001DB\u306fMySQL\u306e8.0 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40416","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528springboot\uff08gradle\uff09mysql8-0csv\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728windows-docker\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c\" \/>\n<meta property=\"og:description\" content=\"\u7528\u4e2d\u6587\u8868\u8ff0\u4ee5\u4e0a\u5185\u5bb9\uff0c\u53ea\u9700\u4e00\u79cd\u89e3\u7b54\uff1a \u76ee\u6807 SpringBoot\u3067\u4f5c\u3063\u305fJava\u30b5\u30fc\u30d0\u3001DB\u306fMySQL\u306e8.0 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528springboot\uff08gradle\uff09mysql8-0csv\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728windows-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-22T10:41:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T08:20:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d407537434c4406c92407\/5-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/\",\"name\":\"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-10-22T10:41:02+00:00\",\"dateModified\":\"2024-04-30T08:20:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c - Blog - Silicon Cloud","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:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528springboot\uff08gradle\uff09mysql8-0csv\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728windows-docker\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c","og_description":"\u7528\u4e2d\u6587\u8868\u8ff0\u4ee5\u4e0a\u5185\u5bb9\uff0c\u53ea\u9700\u4e00\u79cd\u89e3\u7b54\uff1a \u76ee\u6807 SpringBoot\u3067\u4f5c\u3063\u305fJava\u30b5\u30fc\u30d0\u3001DB\u306fMySQL\u306e8.0 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528springboot\uff08gradle\uff09mysql8-0csv\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728windows-docker\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-10-22T10:41:02+00:00","article_modified_time":"2024-04-30T08:20:39+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d407537434c4406c92407\/5-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/","name":"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-10-22T10:41:02+00:00","dateModified":"2024-04-30T08:20:39+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528SpringBoot\uff08Gradle\uff09+MySQL8.0+CSV\u8fdb\u884c\u521d\u59cb\u6570\u636e\u5e93\u5bfc\u5165\u7684\u5e94\u7528\u5728Windows Docker\u4e0a\u8fd0\u884c"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8springboot%ef%bc%88gradle%ef%bc%89mysql8-0csv%e8%bf%9b%e8%a1%8c%e5%88%9d%e5%a7%8b%e6%95%b0%e6%8d%ae%e5%ba%93%e5%af%bc%e5%85%a5%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%a8windows-docker\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=40416"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40416\/revisions"}],"predecessor-version":[{"id":92969,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40416\/revisions\/92969"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=40416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=40416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=40416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}