@@ -3,6 +3,7 @@ plugins {
3
3
id ' application' // application 플러그인 추가
4
4
id ' org.springframework.boot' version ' 3.3.6'
5
5
id ' io.spring.dependency-management' version ' 1.1.7'
6
+ id ' com.gorylenko.gradle-git-properties' version ' 2.4.1' // git 정보 읽기
6
7
}
7
8
8
9
group = ' com.sprint.mission'
@@ -39,6 +40,12 @@ dependencies {
39
40
// Spring Boot Web 의존성 (Spring MVC, REST 등)
40
41
implementation ' org.springframework.boot:spring-boot-starter-web'
41
42
43
+ // Spring Validation 의존성
44
+ implementation ' org.springframework.boot:spring-boot-starter-validation'
45
+
46
+ // Spring Actuator 의존성
47
+ implementation ' org.springframework.boot:spring-boot-starter-actuator'
48
+
42
49
// Lombok 의존성 (간결한 코드 작성)
43
50
compileOnly ' org.projectlombok:lombok' // 컴파일 타임에만 Lombok을 사용
44
51
annotationProcessor ' org.projectlombok:lombok' // Lombok 애노테이션 프로세서
@@ -63,6 +70,23 @@ dependencies {
63
70
}
64
71
65
72
73
+ gitProperties {
74
+ dateFormat = " yyyy-MM-dd'T'HH:mm:ssZ"
75
+ dateFormatTimeZone = " UTC"
76
+ }
77
+
78
+ tasks. register(' writeBuildProperties' ) {
79
+ doLast {
80
+ def props = new Properties ()
81
+ props. setProperty(' version' , project. version. toString())
82
+ props. setProperty(' time' , new Date (). format(" yyyy-MM-dd'T' HH:mm:ss'Z'" , Timezone . getTimeZone(" UTC" )))
83
+
84
+ def file = file(" $buildDir /resources/main/build.properties" )
85
+ file. parentFile. mkdir()
86
+ props. store(file. newWriter(), null )
87
+ }
88
+ }
89
+
66
90
tasks. named(' test' ) {
67
91
useJUnitPlatform()
68
92
}
0 commit comments