From 95dbe8daff7803b60cfcf8da910215ba45c19cf6 Mon Sep 17 00:00:00 2001 From: tatsuya-abe Date: Tue, 9 Jan 2024 10:28:55 +0900 Subject: [PATCH] =?UTF-8?q?refs=20#37=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82=E3=82=92=E3=82=AF=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=83=B3=E3=82=A2=E3=83=83=E3=83=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 6 +----- gradle/libs.versions.toml | 20 +++++++++----------- src/main/resources/application.yaml | 11 +---------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7e5a5c3..b036b4c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ import java.io.ByteArrayOutputStream plugins { - kotlin("jvm") version libs.versions.kotlin + kotlin("jvm") version "1.9.20" alias(libs.plugins.versions) alias(libs.plugins.version.catalog.update) @@ -138,8 +138,6 @@ project(":adapter") { implementation(rootProject.libs.spring.boot.starter.web) implementation(rootProject.libs.spring.boot.starter.webflux) implementation(rootProject.libs.spring.boot.starter.data.jpa) - implementation(rootProject.libs.google.cloud.spanner.spring) - implementation(rootProject.libs.google.cloud.spanner.hibernate) implementation(rootProject.libs.mybatis.spring.boot.starter) testImplementation(rootProject.libs.spring.boot.starter.test) @@ -165,7 +163,6 @@ project(":infrastructure") { implementation(rootProject.libs.spring.boot.starter.web) implementation(rootProject.libs.spring.boot.starter.webflux) implementation(rootProject.libs.spring.boot.starter.data.redis) - implementation(rootProject.libs.google.cloud.spanner.spring) implementation(rootProject.libs.jackson.module.kotlin) implementation(rootProject.libs.jackson.datatype.jsr310) implementation(rootProject.libs.mybatis.spring.boot.starter) @@ -177,7 +174,6 @@ project(":usecase") { dependencies { implementation(project(":core")) implementation(project(":domain")) - implementation(rootProject.libs.google.cloud.spanner.spring) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7f661e5..0de3503 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,22 +2,23 @@ easy-random = "6.2.1" flyway = "10.4.1" groovy = "4.0.7" -kotlin = "1.9.20" mybatis-generator = "1.4.2" spock = "2.4-M1-groovy-4.0" spring-boot = "3.2.1" [libraries] -commons-lang3 = "org.apache.commons:commons-lang3:3.13.0" +commons-lang3 = "org.apache.commons:commons-lang3:3.14.0" easy-random = { module = "io.github.dvgaba:easy-random-core", version.ref = "easy-random" } flyway-core = { module = "org.flywaydb:flyway-core", version.ref = "flyway" } -flyway-spanner = { module = "org.flywaydb:flyway-gcp-spanner", version.ref = "flyway" } flyway-gradle-plugin = { module = "org.flywaydb:flyway-gradle-plugin", version.ref = "flyway" } +flyway-spanner = { module = "org.flywaydb:flyway-gcp-spanner", version.ref = "flyway" } +google-cloud-spanner-jdbc = "com.google.cloud:google-cloud-spanner-jdbc:2.15.0" +google-cloud-spanner-spring = "com.google.cloud:spring-cloud-gcp-starter-data-spanner:5.0.0" groovy = { module = "org.apache.groovy:groovy", version.ref = "groovy" } groovy-sql = { module = "org.apache.groovy:groovy-sql", version.ref = "groovy" } -guava = "com.google.guava:guava:32.1.3-jre" -jackson-module-kotlin = "com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1" +guava = "com.google.guava:guava:33.0.0-jre" jackson-datatype-jsr310 = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.1" +jackson-module-kotlin = "com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1" logback-classic = "ch.qos.logback:logback-classic:1.4.14" logstash-logback-encoder = "net.logstash.logback:logstash-logback-encoder:7.4" mybatis-generator-core = { module = "org.mybatis.generator:mybatis-generator-core", version.ref = "mybatis-generator" } @@ -32,14 +33,11 @@ spring-boot-starter-data-redis = { module = "org.springframework.boot:spring-boo spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "spring-boot" } spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "spring-boot" } spring-boot-starter-webflux = { module = "org.springframework.boot:spring-boot-starter-webflux", version.ref = "spring-boot" } -google-cloud-spanner-spring = "com.google.cloud:spring-cloud-gcp-starter-data-spanner:5.0.0" -google-cloud-spanner-jdbc = "com.google.cloud:google-cloud-spanner-jdbc:2.15.0" -google-cloud-spanner-hibernate = "com.google.cloud:google-cloud-spanner-hibernate-dialect:3.0.3" [plugins] flyway = { id = "org.flywaydb.flyway", version.ref = "flyway" } gradle-git-properties = "com.gorylenko.gradle-git-properties:2.4.1" sonarqube = "org.sonarqube:4.4.1.3373" -spotless = "com.diffplug.spotless:6.22.0" -version-catalog-update = "nl.littlerobots.version-catalog-update:0.8.1" -versions = "com.github.ben-manes.versions:0.49.0" +spotless = "com.diffplug.spotless:6.23.3" +version-catalog-update = "nl.littlerobots.version-catalog-update:0.8.3" +versions = "com.github.ben-manes.versions:0.50.0" diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index ba89e71..9c89a91 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -9,20 +9,11 @@ spring: instance-id: ${GCP_SPANNER_INSTANCE_ID:sandbox} database: ${GCP_SPANNER_DATABASE:sandbox} emulator: - enabled: true + enabled: ${GCP_SPANNER_EMULATOR_ENABLED:true} emulator-host: ${SPANNER_EMULATOR_HOST:localhost:9010} datasource: url: jdbc:cloudspanner://${spring.cloud.gcp.spanner.emulator-host}/projects/${spring.cloud.gcp.spanner.project-id}/instances/${spring.cloud.gcp.spanner.instance-id}/databases/${spring.cloud.gcp.spanner.database}?autoConfigEmulator=${spring.cloud.gcp.spanner.emulator.enabled} driver-class-name: com.google.cloud.spanner.jdbc.JdbcDriver - jpa: - hibernate: - ddl-auto: update - database-platform: com.google.cloud.spanner.hibernate.SpannerDialect - properties: - hibernate: - jdbc: - batch_size: 100 - order_updates: true data: redis: host: ${REDIS_HOST:localhost}