언제나 maven으로 진행했던 프로젝트... pom 설정은 익숙하지만 Gradle로 셋팅하는건 어색해서 게시글로 남겨본다.
plugins {
id 'org.springframework.boot' version '2.7.5'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'java'
}
group = 'com.todo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
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'
testImplementation 'org.projectlombok:lombok:1.18.24'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
// https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.4.0'
// https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core
testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version: '2.2'
// https://mvnrepository.com/artifact/org.modelmapper/modelmapper
implementation group: 'org.modelmapper', name: 'modelmapper', version: '2.1.1'
// https://mvnrepository.com/artifact/org.postgresql/postgresql
implementation group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
//dsl
implementation("com.querydsl:querydsl-jpa:5.0.0")
implementation("com.querydsl:querydsl-apt:5.0.0:jpa")
annotationProcessor("com.querydsl:querydsl-apt:5.0.0:jpa")
annotationProcessor("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final")
annotationProcessor("javax.annotation:javax.annotation-api:1.3.2")
}
tasks.named('test') {
useJUnitPlatform()
}
=== copy ===
implementation("com.querydsl:querydsl-jpa:5.0.0")
implementation("com.querydsl:querydsl-apt:5.0.0:jpa")
annotationProcessor("com.querydsl:querydsl-apt:5.0.0:jpa")
annotationProcessor("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final")
annotationProcessor("javax.annotation:javax.annotation-api:1.3.2")
Q클래스 생성 된다!
'개발 > JPA' 카테고리의 다른 글
Serializable를 사용하는것인가? (0) | 2022.11.16 |
---|---|
JPA + Postgres 사용시 주의할 @Lob (0) | 2022.11.15 |
@Enumerated(EnumType.SRTING) (0) | 2022.07.10 |
Entity 제작시 유의사항 (개인 공부입니다.) (0) | 2022.07.09 |