■ build.gradle ( Querydsl 설정 )
페이지 정보
![profile_image](https://dancepkt.cafe24.com/data/member_image/ad/admin.gif?1630310007)
본문
plugins {
id 'java'
id 'war'
id 'org.springframework.boot' version '3.2.6'
id 'io.spring.dependency-management' version '1.1.5'
//querydsl 추가
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
// Querydsl 추가
querydsl.extendsFrom compileClasspath
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
// Querydsl 추가 ( java 17 경우 : jakarta )
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:3.0.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test') {
useJUnitPlatform()
}
/* 설정 추가 ---------------------------- */
def querydslDir = "src/main/generated" //생성 경로
querydsl {
library = "com.querydsl:querydsl-apt"
jpa = true
querydslDefault = true
querydslSourcesDir = querydslDir
}
//에디터 설정
sourceSets {
main {
java {
srcDirs = ['src/main/java', querydslDir]
}
}
}
//어노테이션 프로세서와 맞물려서 빌드시 생성
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}
/* 설정 종료 ---------------------------- */
![b3bbd698a8bb100149e0c643d6f6529a_1700992696_3927.png b3bbd698a8bb100149e0c643d6f6529a_1700992696_3927.png](https://dancepkt.cafe24.com/data/editor/2311/b3bbd698a8bb100149e0c643d6f6529a_1700992696_3927.png)
![57ffe489b281e9707516913d418d3546_1701574937_061.png 57ffe489b281e9707516913d418d3546_1701574937_061.png](https://dancepkt.cafe24.com/data/editor/2312/57ffe489b281e9707516913d418d3546_1701574937_061.png)
![57ffe489b281e9707516913d418d3546_1701574997_7869.png 57ffe489b281e9707516913d418d3546_1701574997_7869.png](https://dancepkt.cafe24.com/data/editor/2312/57ffe489b281e9707516913d418d3546_1701574997_7869.png)
![cd2091b3be2a244a7b3efdf8822b4c46_1718523001_5011.png cd2091b3be2a244a7b3efdf8822b4c46_1718523001_5011.png](https://dancepkt.cafe24.com/data/editor/2406/cd2091b3be2a244a7b3efdf8822b4c46_1718523001_5011.png)
- 이전글BoardRepository 24.06.17
- 다음글■ 쿼리 메서드 기능 , JPQL 기능 24.06.15
댓글목록
등록된 댓글이 없습니다.