-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6b8e70c
[chore] : JDK 버전을 11에서 17로 변경한다
devxb 483ce1d
[refactor] : RequestTimeUtil이 6-digit precision을 반환하도록 수정한다
devxb e07a432
[test] : Request scope를 사용할 수 없는 테스트에서도 Instant.now가 6-digit을 반환하도록 한다
devxb 61ba9bc
[chore] : e2e CI에 jdk17 과 gradle 구성을 추가한다
devxb 0f24a91
[refactor] : TimeUtil을 static하게 변경한다
devxb 4391868
[feat] : TimeUtil에 clear 기능을 추가한다
devxb 08449bb
[refactor] : remove unused import
devxb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
package me.nalab.core.time; | ||
|
||
import java.time.Clock; | ||
import java.time.Instant; | ||
import java.time.LocalDateTime; | ||
import java.time.ZoneId; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
/** | ||
* 저장된 시간을 일간되게 반환하는 util 입니다. | ||
*/ | ||
public interface TimeUtil { | ||
public class TimeUtil { | ||
|
||
/** | ||
* 저장된 시간을 LocalDateTime으로 반환합니다. | ||
* @return LocalDateTime | ||
*/ | ||
LocalDateTime toLocalDateTime(); | ||
private static Clock clock = null; | ||
|
||
/** | ||
* 저장된 시간을 Instant로 반환합니다. | ||
* @return Instant | ||
*/ | ||
Instant toInstant(); | ||
private TimeUtil() { | ||
throw new UnsupportedOperationException("Cannot invoke constructor \"TimeUtil()\""); | ||
} | ||
|
||
public static Instant toInstant() { | ||
var current = Instant.now(); | ||
if (clock != null) { | ||
current = Instant.now(clock); | ||
} | ||
return formatTo6Digit(current); | ||
} | ||
|
||
private static Instant formatTo6Digit(Instant instant) { | ||
var formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSX") | ||
.withZone(ZoneId.of("UTC")); | ||
return Instant.parse(formatter.format(instant)); | ||
} | ||
|
||
public static void fixed(Clock clock) { | ||
TimeUtil.clock = clock; | ||
} | ||
|
||
public static void clear() { | ||
TimeUtil.clock = null; | ||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
core/time/src/main/java/me/nalab/core/time/request/RequestTimeUtil.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
module luffy.core.time.main { | ||
|
||
requires spring.context; | ||
requires spring.beans; | ||
|
||
exports me.nalab.core.time; | ||
exports me.nalab.core.time.request; | ||
|
||
} |
44 changes: 0 additions & 44 deletions
44
core/time/src/test/java/me/nalab/core/time/RequestTimeUtilTest.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
core/time/src/test/java/me/nalab/core/time/TestController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 독립적으로 재사용하려면 넣어줘야할거같아