Skip to content
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

[REFACTOR] Spring boot 2->3 migration 및 JAVA 21 도입 - #347 #350

Merged
merged 15 commits into from
Sep 24, 2024

Conversation

rlarlgnszx
Copy link
Contributor

@rlarlgnszx rlarlgnszx commented Sep 24, 2024

📝 PR Summary

🌴 Works

  • spring data jdbc 제거
  • gradle 7-> 8.8 변경
  • spring boot 2.7.4 -> 3.3.1 변경
  • java 17 -> java 21 변경
  • spring security 5-> 6으로 변경
  • openapi [swagger] 1.x -> 2.6 변경
  • JAVA EE -> Jakarta EE 로 변경
  • array type 지정 라이브러리 변경 -> io.hypersistence:hypersistence-utils-hibernate-63:3.8.2
  • hibernate 6 사용

🌱 Related Issue

closed #347

🌵 PR 참고사항

  • 스프링 버젼이 update 됨에 따라서 yaml파일의 구조가 약간 변경되었습니다
  • 변경된 부분은 체크해놓겠습니다!
  • 또한 변경됨에 따라서 build하는 java21 sdk를 다운받아주셔야합니다! 저는 corretto-21을 사용했습니다!
  • 그에 맞춰서 workflow ci.cd 파일도 java 21에 맞춰 설정해두겠습니다!

@rlarlgnszx rlarlgnszx requested a review from kseysh September 24, 2024 09:12
Copy link

height bot commented Sep 24, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@rlarlgnszx rlarlgnszx self-assigned this Sep 24, 2024
@rlarlgnszx rlarlgnszx added 🧹 Chore 기능 수정이 아닌 잡일들 🔨 Refactor 코드 개선 and removed size/L labels Sep 24, 2024
Copy link
Member

@kseysh kseysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 몇 가지 리뷰와 함께 CI/CD 통과만 해주시면 좋을 것 같아요 :)

build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
@@ -51,19 +51,20 @@ public class S3Service {
@Value("${cloud.aws.s3.uri}")
private String baseURI;

private final AmazonS3 amazonS3;
private AmazonS3 amazonS3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q. AmazonS3가 객체 변수로 들어가야하는 이유가 있을까요?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1. final로 들어가 있지 않으면 uploadDeprecated에서 NPE가 발생할 것 같아요

Copy link
Contributor Author

@rlarlgnszx rlarlgnszx Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
기존의 S3service를 @PostConstruct구조로 생성되기 전에 빈으로 등록하는과정에서 오류가 발생했었습니다!
따라서 기존의 코드를 유지하되 지정되는 빈을 등록해주게 하기 위해 다음과 같이 구현하게 되었습니다!

Comment on lines 3 to 14
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P4. 와일드 카드 사용하면 좋을 것 같아요!

@@ -16,7 +16,7 @@ public class FortuneCardRepositoryImpl implements FortuneCardRepository {
@Override
public Optional<FortuneCard> findByRelatedUserId(final Long userId) {

QFortuneCard fortuneCard = new QFortuneCard("fortuneCard");
QFortuneCard fortuneCard = QFortuneCard.fortuneCard;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옹 이런 방법이 있네요 더 깔끔한듯!

@rlarlgnszx rlarlgnszx requested a review from kseysh September 24, 2024 16:26
@rlarlgnszx rlarlgnszx merged commit bb8c1d0 into dev Sep 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 Chore 기능 수정이 아닌 잡일들 🔨 Refactor 코드 개선 size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACTOR] Spring boot 2->3 migration 및 JAVA 21 도입
2 participants