File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ dependencies {
3737 runtimeOnly ' com.h2database:h2'
3838 runtimeOnly ' com.mysql:mysql-connector-j'
3939
40+ // Querydsl
41+ implementation ' com.querydsl:querydsl-jpa:5.0.0:jakarta'
42+ annotationProcessor " com.querydsl:querydsl-apt:${ dependencyManagement.importedProperties['querydsl.version']} :jakarta"
43+ annotationProcessor " jakarta.annotation:jakarta.annotation-api"
44+ annotationProcessor " jakarta.persistence:jakarta.persistence-api"
45+
4046 // OAuth & Security
4147 implementation ' org.springframework.boot:spring-boot-starter-oauth2-authorization-server'
4248 implementation ' org.springframework.boot:spring-boot-starter-oauth2-client'
@@ -58,6 +64,24 @@ dependencies {
5864 testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
5965}
6066
67+ // Querydsl 설정
68+ def generated = ' src/main/generated'
69+
70+ // QClass 파일 생성 위치를 지정
71+ tasks. withType(JavaCompile ). configureEach {
72+ options. getGeneratedSourceOutputDirectory(). set(file(generated))
73+ }
74+
75+ // java source set 에 querydsl QClass 위치 추가
76+ sourceSets {
77+ main. java. srcDirs + = [ generated ]
78+ }
79+
80+ // gradle clean 시에 QClass 디렉토리 삭제
81+ clean {
82+ delete file(generated)
83+ }
84+
6185tasks. named(' test' ) {
6286 useJUnitPlatform()
6387 jvmArgs(" -XX:+EnableDynamicAgentLoading" )
You can’t perform that action at this time.
0 commit comments