2025-08-08 13:26:09 +09:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'org.springframework.boot' version '3.5.4'
|
|
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
2025-08-26 13:21:15 +09:00
|
|
|
id 'com.google.cloud.tools.jib' version '3.4.0' // Jib 플러그인 추가
|
2025-08-08 13:26:09 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
group = 'com.bio'
|
|
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
|
|
|
|
java {
|
|
|
|
toolchain {
|
|
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
compileOnly {
|
|
|
|
extendsFrom annotationProcessor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
2025-08-20 16:22:11 +09:00
|
|
|
|
2025-08-13 10:11:54 +09:00
|
|
|
// PostgreSQL JDBC
|
2025-08-08 13:26:09 +09:00
|
|
|
runtimeOnly 'org.postgresql:postgresql'
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
2025-08-11 11:31:02 +09:00
|
|
|
|
2025-08-13 10:11:54 +09:00
|
|
|
// Spring Securit
|
2025-08-11 11:31:02 +09:00
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
|
|
|
2025-08-13 10:11:54 +09:00
|
|
|
// Validation
|
2025-08-11 11:31:02 +09:00
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
|
|
|
2025-08-13 10:11:54 +09:00
|
|
|
// MapStruct
|
2025-08-12 15:00:12 +09:00
|
|
|
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
|
|
|
|
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
|
2025-08-11 11:31:02 +09:00
|
|
|
|
2025-08-13 10:11:54 +09:00
|
|
|
// MyBatis
|
2025-08-11 11:31:02 +09:00
|
|
|
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
|
2025-08-12 08:46:55 +09:00
|
|
|
|
|
|
|
// jwt
|
|
|
|
implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
|
2025-08-20 16:22:11 +09:00
|
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'
|
|
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5'
|
2025-08-13 10:11:54 +09:00
|
|
|
|
|
|
|
// lombok
|
2025-08-08 13:26:09 +09:00
|
|
|
compileOnly 'org.projectlombok:lombok'
|
|
|
|
annotationProcessor 'org.projectlombok:lombok'
|
2025-08-12 15:00:12 +09:00
|
|
|
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
|
2025-08-08 13:26:09 +09:00
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
2025-08-11 09:20:35 +09:00
|
|
|
|
|
|
|
// querydsl
|
2025-08-13 10:11:54 +09:00
|
|
|
implementation 'io.github.openfeign.querydsl:querydsl-jpa:6.11'
|
|
|
|
annotationProcessor 'io.github.openfeign.querydsl:querydsl-apt:6.11:jpa'
|
|
|
|
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'
|
|
|
|
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
|
|
|
|
|
2025-08-11 09:20:35 +09:00
|
|
|
// p6spy
|
|
|
|
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0'
|
2025-08-13 13:53:15 +09:00
|
|
|
|
|
|
|
// SpringDoc OpenAPI (Swagger)
|
|
|
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'
|
2025-08-08 13:26:09 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named('test') {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2025-08-11 09:20:35 +09:00
|
|
|
|
|
|
|
// querydsl
|
2025-08-13 10:42:08 +09:00
|
|
|
def generatedSrcDir = 'build/generated/sources/annotation-processor'
|
2025-08-13 10:11:54 +09:00
|
|
|
clean {
|
2025-08-13 10:42:08 +09:00
|
|
|
delete file(generatedSrcDir)
|
2025-08-11 09:20:35 +09:00
|
|
|
}
|
2025-08-13 10:11:54 +09:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
2025-08-13 10:42:08 +09:00
|
|
|
options.generatedSourceOutputDirectory = file(generatedSrcDir)
|
2025-08-26 13:21:15 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
jib {
|
|
|
|
from {
|
|
|
|
image = 'demo.stam.kr/leejisun9/eclipse-temurin:17-jre' // 가벼운 JRE 베이스
|
|
|
|
// (선택) 인증서 추가/회사 CA 필요 시 extraDirectories 사용
|
|
|
|
}
|
|
|
|
to {
|
|
|
|
image = 'demo.stam.kr/leejisun9/bio-backend'; tags = ['1.0.0'] // 기본 대상 레지스트리
|
|
|
|
// tags는 skaffold가 자동 주입. 로컬 단독 빌드시 -Djib.to.tags=로 지정 가능
|
|
|
|
}
|
|
|
|
container {
|
|
|
|
// Spring Boot 컨테이너 런타임 옵션
|
|
|
|
ports = ['8080']
|
|
|
|
jvmFlags = [
|
|
|
|
'-XX:+UseContainerSupport',
|
|
|
|
'-Dserver.port=8080',
|
|
|
|
'-XX:InitialRAMPercentage=50.0',
|
|
|
|
'-XX:MaxRAMPercentage=75.0'
|
|
|
|
]
|
|
|
|
environment = [ 'SPRING_PROFILES_ACTIVE': 'dev' ]
|
|
|
|
// (선택) non-root 권장 (권한 필요한 리소스 없는 경우)
|
|
|
|
// user = '65532:65532'
|
|
|
|
// workingDirectory = '/app'
|
|
|
|
}
|
|
|
|
// (선택) 계층 최적화/추가 파일
|
|
|
|
// extraDirectories {
|
|
|
|
// paths {
|
|
|
|
// path {
|
|
|
|
// from = file('docker/extra') // 예: CA cert, 설정 템플릿
|
|
|
|
// into = '/opt/extra'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
2025-08-13 10:11:54 +09:00
|
|
|
}
|