-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chore] : JDK version migration 11 to 17 #372
Changes from 4 commits
6b8e70c
483ce1d
e07a432
61ba9bc
0f24a91
4391868
08449bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM openjdk:11.0.11-jre-slim | ||
FROM openjdk:17-jdk-slim | ||
|
||
ARG JAR_FILE=./api/build/libs/*-SNAPSHOT.jar | ||
ARG DB_URL | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,10 @@ | |
|
||
import java.time.Instant; | ||
import java.time.LocalDateTime; | ||
import java.time.ZoneId; | ||
import java.time.ZoneOffset; | ||
|
||
import java.time.format.DateTimeFormatter; | ||
import org.springframework.context.annotation.Scope; | ||
import org.springframework.context.annotation.ScopedProxyMode; | ||
import org.springframework.stereotype.Component; | ||
|
@@ -20,7 +22,10 @@ public class RequestTimeUtil implements TimeUtil { | |
private final Instant instant; | ||
|
||
public RequestTimeUtil() { | ||
instant = Instant.now(); | ||
var current = Instant.now(); | ||
var formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSX") | ||
.withZone(ZoneId.of("UTC")); | ||
this.instant = Instant.parse(formatter.format(current)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 변경이유DB에서 TIMESTAMP(6) 로 저장하고있는데, Instant.now() 가 9-digit 날짜를 생성해서 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DB쪽 timestamp precision 올리는 건 어렵나? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 될거같은데, 한번 flyway랑 |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package me.nalab.survey.jpa.adaptor; | ||
|
||
import java.time.Instant; | ||
import java.time.ZoneId; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
public class TestTimeUtil { | ||
|
||
public static Instant now() { | ||
var current = Instant.now(); | ||
var formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSX") | ||
.withZone(ZoneId.of("UTC")); | ||
return Instant.parse(formatter.format(current)); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setup-java에서 gradle cache 있었던 거 같은데 다른가 이거랑?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 다른 .yml에서 한번이상 cache하면 재사용되는데, 우리처럼 시간 오래지나서 cache한게 없으면 실패되더라고
이거 ciaks 독립적으로 재사용하려면 넣어줘야할거같아