[QueryDSL 세팅 및 전체 구조 세팅]

This commit is contained in:
2025-08-11 09:20:35 +09:00
parent a21d9909ec
commit 544cec0e81
7 changed files with 94 additions and 9 deletions

View File

@@ -23,6 +23,12 @@ repositories {
mavenCentral()
}
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}
dependencies {
// 개발용 의존성 추가
developmentOnly 'org.springframework.boot:spring-boot-devtools'
@@ -34,9 +40,31 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// querydsl
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}:jakarta"
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
// p6spy
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0'
}
tasks.named('test') {
useJUnitPlatform()
}
// querydsl
def querydslDir = "$buildDir/generated/querydsl"
sourceSets {
main.java.srcDirs += [ querydslDir ]
}
tasks.withType(JavaCompile) {
options.annotationProcessorGeneratedSourcesDirectory = file(querydslDir)
}
clean.doLast {
file(querydslDir).deleteDir()
}