From 50e23d25b4c0aeb9528567ee60e4c3e5d7cc3a75 Mon Sep 17 00:00:00 2001 From: toychip Date: Thu, 13 Jun 2024 22:56:24 +0900 Subject: [PATCH 01/11] add: Querydsl dependency --- build.gradle.kts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 63745d06..f8618f86 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -92,6 +92,17 @@ project(":entity") { // Jasypt implementation("com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5") + + // Querydsl + val queryDslVersion = "6.0" + implementation("io.github.openfeign.querydsl:querydsl-core:$queryDslVersion") + implementation("io.github.openfeign.querydsl:querydsl-jpa:$queryDslVersion") + annotationProcessor("io.github.openfeign.querydsl:querydsl-apt:$queryDslVersion:jpa") + annotationProcessor("jakarta.annotation:jakarta.annotation-api") + annotationProcessor("jakarta.persistence:jakarta.persistence-api") + + // query 값 정렬 + implementation("com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0") } } From 58277bb6d21f4738d21f827ef1862db432ed303b Mon Sep 17 00:00:00 2001 From: toychip Date: Thu, 13 Jun 2024 23:01:30 +0900 Subject: [PATCH 02/11] add: Querydsl Config --- .../com/mashup/dojo/config/QuerydslConfig.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt diff --git a/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt b/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt new file mode 100644 index 00000000..476952fd --- /dev/null +++ b/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt @@ -0,0 +1,19 @@ +package com.mashup.dojo.config + +import com.querydsl.jpa.impl.JPAQueryFactory +import jakarta.persistence.EntityManager +import jakarta.persistence.PersistenceContext +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration + +@Configuration +class QuerydslConfig { + + @PersistenceContext + private lateinit var entityManager: EntityManager + + @Bean + fun jpaQueryFactory(): JPAQueryFactory { + return JPAQueryFactory(entityManager) + } +} From ac099cb453bbdebdf52c0d13d03f0eb348985eb4 Mon Sep 17 00:00:00 2001 From: toychip Date: Thu, 13 Jun 2024 23:07:02 +0900 Subject: [PATCH 03/11] rename: BaseEntity to BaseTimeEntity --- .../dojo/{BaseEntity.kt => base/BaseTimeEntity.kt} | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) rename entity/src/main/kotlin/com/mashup/dojo/{BaseEntity.kt => base/BaseTimeEntity.kt} (62%) diff --git a/entity/src/main/kotlin/com/mashup/dojo/BaseEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt similarity index 62% rename from entity/src/main/kotlin/com/mashup/dojo/BaseEntity.kt rename to entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt index 3826241c..afdea419 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/BaseEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt @@ -1,10 +1,7 @@ -package com.mashup.dojo +package com.mashup.dojo.base import jakarta.persistence.Column import jakarta.persistence.EntityListeners -import jakarta.persistence.GeneratedValue -import jakarta.persistence.GenerationType -import jakarta.persistence.Id import jakarta.persistence.MappedSuperclass import org.springframework.data.annotation.CreatedDate import org.springframework.data.annotation.LastModifiedDate @@ -13,11 +10,7 @@ import java.time.LocalDateTime @MappedSuperclass @EntityListeners(AuditingEntityListener::class) -abstract class BaseEntity { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id", nullable = false) - val id: Long = 0L +abstract class BaseTimeEntity { @CreatedDate @Column(name = "created_at", nullable = false) @@ -26,7 +19,4 @@ abstract class BaseEntity { @LastModifiedDate @Column(name = "updated_at", nullable = false) lateinit var updatedAt: LocalDateTime - - @Column(name = "is_deleted", nullable = false) - var isDeleted: Boolean = false } From 5fd718ea13ab46ec978b31d5fdbea93dd66c94c2 Mon Sep 17 00:00:00 2001 From: toychip Date: Thu, 13 Jun 2024 23:26:48 +0900 Subject: [PATCH 04/11] add: BaseEntity createdBy, lastModifiedBy --- .../kotlin/com/mashup/dojo/base/BaseEntity.kt | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt new file mode 100644 index 00000000..69eac988 --- /dev/null +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt @@ -0,0 +1,36 @@ +package com.mashup.dojo.base + +import jakarta.persistence.Column +import jakarta.persistence.EntityListeners +import jakarta.persistence.MappedSuperclass +import org.springframework.data.annotation.CreatedBy +import org.springframework.data.annotation.LastModifiedBy +import org.springframework.data.jpa.domain.support.AuditingEntityListener + +@MappedSuperclass +@EntityListeners(AuditingEntityListener::class) +abstract class BaseEntity : BaseTimeEntity() { + + @CreatedBy + @Column(updatable = false) + var createdBy: String? = null + private set + + @LastModifiedBy + var lastModifiedBy: String? = null + private set + + @Column(nullable = false) + var deleted: Boolean = false + private set + + // 재활성화 - soft delete + fun activate() { + this.deleted = false + } + + // 비활성화 - soft delete + fun deactivate() { + this.deleted = true + } +} From 55115a285cd472fc8f63af7012a76f59fb571043 Mon Sep 17 00:00:00 2001 From: toychip Date: Thu, 13 Jun 2024 23:27:13 +0900 Subject: [PATCH 05/11] add: private set & updatable false --- .../src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt index afdea419..92f020dc 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt @@ -13,10 +13,12 @@ import java.time.LocalDateTime abstract class BaseTimeEntity { @CreatedDate - @Column(name = "created_at", nullable = false) + @Column(name = "created_at", nullable = false, updatable = false) lateinit var createdAt: LocalDateTime - + private set + @LastModifiedDate @Column(name = "updated_at", nullable = false) lateinit var updatedAt: LocalDateTime + private set } From 43b4a156b93e28ad5b076e6ecc55c29bfcb171be Mon Sep 17 00:00:00 2001 From: toychip Date: Thu, 13 Jun 2024 23:45:50 +0900 Subject: [PATCH 06/11] add: Enable JPA Auditing and use UUID for temporary auditor - Added @EnableJpaAuditing for JPA auditing. - Implemented temporary auditorProvider with UUID generation. --- .../mashup/dojo/config/BaseEntityConfig.kt | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt diff --git a/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt b/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt new file mode 100644 index 00000000..a74e5527 --- /dev/null +++ b/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt @@ -0,0 +1,37 @@ +package com.mashup.dojo.config + +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.data.domain.AuditorAware +import org.springframework.data.jpa.repository.config.EnableJpaAuditing +import java.util.Optional +import java.util.UUID + +@EnableJpaAuditing +@Configuration +class BaseEntityConfig { + + @Bean + fun auditorProvider(): AuditorAware { + return AuditorAware { + + /* + val authentication: Authentication? = SecurityContextHolder.getContext().authentication + if (authentication == null) { + return@AuditorAware Optional.of("AnonymousNULL") + } + + val principal: Any = authentication.principal + if (principal is Member) { + val email: String? = principal.email + return@AuditorAware Optional.ofNullable(email) + } + // principal이 Member 타입이 아닌 경우의 처리 + Optional.of("AnonymousNOT_TYPE") + */ + + // 임시로 UUID 생성하여 반환 + Optional.of(UUID.randomUUID().toString()) + } + } +} From 8f0ed426ba0ac1de31f1e95c1a34790e6cbe4d6c Mon Sep 17 00:00:00 2001 From: toychip Date: Fri, 14 Jun 2024 00:07:27 +0900 Subject: [PATCH 07/11] fix: Restore ID field in BaseEntity & rename deleted to isDeleted --- .../main/kotlin/com/mashup/dojo/SampleEntity.kt | 1 + .../main/kotlin/com/mashup/dojo/base/BaseEntity.kt | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/entity/src/main/kotlin/com/mashup/dojo/SampleEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/SampleEntity.kt index bb42db16..fefe8f9b 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/SampleEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/SampleEntity.kt @@ -1,5 +1,6 @@ package com.mashup.dojo +import com.mashup.dojo.base.BaseEntity import jakarta.persistence.Entity @Entity diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt index 69eac988..d08538e5 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt @@ -2,6 +2,9 @@ package com.mashup.dojo.base import jakarta.persistence.Column import jakarta.persistence.EntityListeners +import jakarta.persistence.GeneratedValue +import jakarta.persistence.GenerationType +import jakarta.persistence.Id import jakarta.persistence.MappedSuperclass import org.springframework.data.annotation.CreatedBy import org.springframework.data.annotation.LastModifiedBy @@ -11,6 +14,11 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener @EntityListeners(AuditingEntityListener::class) abstract class BaseEntity : BaseTimeEntity() { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id", nullable = false) + val id: Long = 0L + @CreatedBy @Column(updatable = false) var createdBy: String? = null @@ -21,16 +29,16 @@ abstract class BaseEntity : BaseTimeEntity() { private set @Column(nullable = false) - var deleted: Boolean = false + var isDeleted: Boolean = false private set // 재활성화 - soft delete fun activate() { - this.deleted = false + this.isDeleted = false } // 비활성화 - soft delete fun deactivate() { - this.deleted = true + this.isDeleted = true } } From 9a4799f358cd75eb7e496db4e112c7d2c83b4391 Mon Sep 17 00:00:00 2001 From: toychip Date: Fri, 14 Jun 2024 00:08:10 +0900 Subject: [PATCH 08/11] fix: ControllerAdvice Typo --- .../kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt b/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt index cc96dfe1..6f00efe5 100644 --- a/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt +++ b/api/src/main/kotlin/com/mashup/dojo/common/ControllerExceptionAdvice.kt @@ -19,7 +19,7 @@ class ControllerExceptionAdvice { } @ExceptionHandler(DojoException::class) - fun handleMoitException(ex: DojoException): ResponseEntity> { + fun handleDojoException(ex: DojoException): ResponseEntity> { log.error { "Dojo Exception Handler $ex" } return errorResponse(ex.httpStatusCode, ex.toApiErrorResponse()) } From 89f96e7d04a5d777d0bece6246cacc438faacc72 Mon Sep 17 00:00:00 2001 From: toychip Date: Fri, 14 Jun 2024 00:22:56 +0900 Subject: [PATCH 09/11] refactor: Move ID field from BaseEntity to BaseTimeEntity --- entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt | 8 -------- .../main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt index d08538e5..013f8202 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt @@ -2,9 +2,6 @@ package com.mashup.dojo.base import jakarta.persistence.Column import jakarta.persistence.EntityListeners -import jakarta.persistence.GeneratedValue -import jakarta.persistence.GenerationType -import jakarta.persistence.Id import jakarta.persistence.MappedSuperclass import org.springframework.data.annotation.CreatedBy import org.springframework.data.annotation.LastModifiedBy @@ -14,11 +11,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener @EntityListeners(AuditingEntityListener::class) abstract class BaseEntity : BaseTimeEntity() { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id", nullable = false) - val id: Long = 0L - @CreatedBy @Column(updatable = false) var createdBy: String? = null diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt index 92f020dc..3656666c 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt @@ -2,6 +2,9 @@ package com.mashup.dojo.base import jakarta.persistence.Column import jakarta.persistence.EntityListeners +import jakarta.persistence.GeneratedValue +import jakarta.persistence.GenerationType +import jakarta.persistence.Id import jakarta.persistence.MappedSuperclass import org.springframework.data.annotation.CreatedDate import org.springframework.data.annotation.LastModifiedDate @@ -12,6 +15,11 @@ import java.time.LocalDateTime @EntityListeners(AuditingEntityListener::class) abstract class BaseTimeEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id", nullable = false) + val id: Long = 0L + @CreatedDate @Column(name = "created_at", nullable = false, updatable = false) lateinit var createdAt: LocalDateTime From a847dea24deed8eab29386b65f3aa52b75c9e69c Mon Sep 17 00:00:00 2001 From: toychip Date: Sat, 15 Jun 2024 00:27:31 +0900 Subject: [PATCH 10/11] style: apply editorconfig --- .../kotlin/com/mashup/dojo/base/BaseEntity.kt | 1 - .../com/mashup/dojo/base/BaseTimeEntity.kt | 5 ++--- .../mashup/dojo/config/BaseEntityConfig.kt | 4 +--- .../mashup/dojo/config/DojoJasyptConfig.kt | 22 +++++++++---------- .../com/mashup/dojo/config/QuerydslConfig.kt | 1 - 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt index 013f8202..83f015a2 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseEntity.kt @@ -10,7 +10,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener @MappedSuperclass @EntityListeners(AuditingEntityListener::class) abstract class BaseEntity : BaseTimeEntity() { - @CreatedBy @Column(updatable = false) var createdBy: String? = null diff --git a/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt index 3656666c..b5392aed 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/base/BaseTimeEntity.kt @@ -14,17 +14,16 @@ import java.time.LocalDateTime @MappedSuperclass @EntityListeners(AuditingEntityListener::class) abstract class BaseTimeEntity { - @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id", nullable = false) val id: Long = 0L - + @CreatedDate @Column(name = "created_at", nullable = false, updatable = false) lateinit var createdAt: LocalDateTime private set - + @LastModifiedDate @Column(name = "updated_at", nullable = false) lateinit var updatedAt: LocalDateTime diff --git a/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt b/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt index a74e5527..7474054b 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/config/BaseEntityConfig.kt @@ -10,11 +10,9 @@ import java.util.UUID @EnableJpaAuditing @Configuration class BaseEntityConfig { - @Bean fun auditorProvider(): AuditorAware { return AuditorAware { - /* val authentication: Authentication? = SecurityContextHolder.getContext().authentication if (authentication == null) { @@ -29,7 +27,7 @@ class BaseEntityConfig { // principal이 Member 타입이 아닌 경우의 처리 Optional.of("AnonymousNOT_TYPE") */ - + // 임시로 UUID 생성하여 반환 Optional.of(UUID.randomUUID().toString()) } diff --git a/entity/src/main/kotlin/com/mashup/dojo/config/DojoJasyptConfig.kt b/entity/src/main/kotlin/com/mashup/dojo/config/DojoJasyptConfig.kt index a3049fcd..55152243 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/config/DojoJasyptConfig.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/config/DojoJasyptConfig.kt @@ -11,7 +11,6 @@ import org.springframework.context.annotation.Configuration @Configuration @EnableEncryptableProperties class DojoJasyptConfig { - @Value("\${JASYPT_ENCRYPTOR_PASSWORD}") private lateinit var password: String @@ -19,16 +18,17 @@ class DojoJasyptConfig { fun stringEncryptor(): StringEncryptor { val encryptor = PooledPBEStringEncryptor() val configPassword = password - val config = SimpleStringPBEConfig().apply { - this.password = configPassword - this.algorithm = "PBEWithMD5AndDES" - this.keyObtentionIterations = 1000 - this.poolSize = 1 - this.providerName = "SunJCE" - this.saltGenerator = org.jasypt.salt.RandomSaltGenerator() - this.ivGenerator = org.jasypt.iv.NoIvGenerator() - this.stringOutputType = "base64" - } + val config = + SimpleStringPBEConfig().apply { + this.password = configPassword + this.algorithm = "PBEWithMD5AndDES" + this.keyObtentionIterations = 1000 + this.poolSize = 1 + this.providerName = "SunJCE" + this.saltGenerator = org.jasypt.salt.RandomSaltGenerator() + this.ivGenerator = org.jasypt.iv.NoIvGenerator() + this.stringOutputType = "base64" + } encryptor.setConfig(config) return encryptor } diff --git a/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt b/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt index 476952fd..71f80fad 100644 --- a/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt +++ b/entity/src/main/kotlin/com/mashup/dojo/config/QuerydslConfig.kt @@ -8,7 +8,6 @@ import org.springframework.context.annotation.Configuration @Configuration class QuerydslConfig { - @PersistenceContext private lateinit var entityManager: EntityManager From 9aec47072ca14d6e1c5ae098c80a686fe8daeaef Mon Sep 17 00:00:00 2001 From: toychip Date: Sat, 15 Jun 2024 00:38:21 +0900 Subject: [PATCH 11/11] refactor: move versions to gradle.properties - Use gradle.properties for plugin and dependency versions - Update build.gradle.kts to read versions from gradle.properties --- build.gradle.kts | 23 ++++++++++++----------- gradle.properties | 7 +++++++ 2 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 gradle.properties diff --git a/build.gradle.kts b/build.gradle.kts index f8618f86..bf942ace 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,8 +14,10 @@ plugins { idea } +val properties = project.properties + java { - sourceCompatibility = JavaVersion.VERSION_21 + sourceCompatibility = JavaVersion.toVersion(properties["javaVersion"] as String) } allprojects { @@ -45,13 +47,13 @@ subprojects { testImplementation("org.springframework.boot:spring-boot-starter-test") testRuntimeOnly("org.junit.platform:junit-platform-launcher") // logging - implementation("io.github.oshai:kotlin-logging-jvm:5.1.0") + implementation("io.github.oshai:kotlin-logging-jvm:${properties["kotlinLoggingJvmVersion"]}") } tasks.withType { kotlinOptions { freeCompilerArgs += "-Xjsr305=strict" - jvmTarget = "21" + jvmTarget = properties["javaVersion"] as String } } @@ -87,22 +89,21 @@ project(":entity") { dependencies { api("org.springframework.boot:spring-boot-starter-data-jpa") - api("com.mysql:mysql-connector-j:8.4.0") - runtimeOnly("com.h2database:h2") // todo : fade out + api("com.mysql:mysql-connector-j:${properties["mysqlConnectorVersion"]}") + runtimeOnly("com.h2database:h2:${properties["h2DatabaseVersion"]}") // todo : fade out // Jasypt - implementation("com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5") + implementation("com.github.ulisesbocchio:jasypt-spring-boot-starter:${properties["jasyptSpringBootStarterVersion"]}") // Querydsl - val queryDslVersion = "6.0" - implementation("io.github.openfeign.querydsl:querydsl-core:$queryDslVersion") - implementation("io.github.openfeign.querydsl:querydsl-jpa:$queryDslVersion") - annotationProcessor("io.github.openfeign.querydsl:querydsl-apt:$queryDslVersion:jpa") + implementation("io.github.openfeign.querydsl:querydsl-core:${properties["queryDslVersion"]}") + implementation("io.github.openfeign.querydsl:querydsl-jpa:${properties["queryDslVersion"]}") + annotationProcessor("io.github.openfeign.querydsl:querydsl-apt:${properties["queryDslVersion"]}:jpa") annotationProcessor("jakarta.annotation:jakarta.annotation-api") annotationProcessor("jakarta.persistence:jakarta.persistence-api") // query 값 정렬 - implementation("com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0") + implementation("com.github.gavlyukovskiy:p6spy-spring-boot-starter:${properties["p6spyVersion"]}") } } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..337a62db --- /dev/null +++ b/gradle.properties @@ -0,0 +1,7 @@ +javaVersion=21 +kotlinLoggingJvmVersion=5.1.0 +queryDslVersion=6.0 +jasyptSpringBootStarterVersion=3.0.5 +mysqlConnectorVersion=8.4.0 +h2DatabaseVersion=2.1.210 +p6spyVersion=1.9.0