diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index fe15ae5..2769e58 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -17,11 +17,11 @@ jobs: # JDK setting - github actions에서 사용할 JDK 설정 (프로젝트나 AWS의 java 버전과 달라도 무방) - uses: actions/checkout@v3 - - name: Set up JDK 17 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '17' - distribution: 'adopt' + java-version: '11' + distribution: 'temurin' # gradle caching - 빌드 시간 향상 - name: Gradle Caching diff --git a/Dockerfile b/Dockerfile index 27b4577..09596ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -# open jdk 17 버전의 환경을 구성 -FROM openjdk:17-alpine +# open jdk 11 버전의 환경을 구성 +FROM adoptopenjdk/openjdk11:latest # build가 되는 시점에 JAR_FILE이라는 변수 명에 build/libs/*.jar 선언 # build/libs - gradle로 빌드했을 때 jar 파일이 생성되는 경로 diff --git a/build.gradle b/build.gradle index 01ab886..0b3b756 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,14 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.1.4' - id 'io.spring.dependency-management' version '1.1.3' + id 'org.springframework.boot' version '2.7.14' + id 'io.spring.dependency-management' version '1.0.15.RELEASE' } group = 'com.onestep' version = '0.0.1-SNAPSHOT' java { - sourceCompatibility = '17' + sourceCompatibility = '11' } configurations { diff --git a/src/main/java/com/onestep/server/ServerApplication.java b/src/main/java/com/onestep/server/ServerApplication.java index a75fc2e..228435e 100644 --- a/src/main/java/com/onestep/server/ServerApplication.java +++ b/src/main/java/com/onestep/server/ServerApplication.java @@ -5,7 +5,9 @@ @SpringBootApplication public class ServerApplication { - + static { + System.setProperty("com.amazonaws.sdk.disableEc2Metadata", "true"); + } public static void main(String[] args) { SpringApplication.run(ServerApplication.class, args); } diff --git a/src/main/java/com/onestep/server/entity/Answer.java b/src/main/java/com/onestep/server/entity/Answer.java index 0cedfc7..a109664 100644 --- a/src/main/java/com/onestep/server/entity/Answer.java +++ b/src/main/java/com/onestep/server/entity/Answer.java @@ -1,9 +1,9 @@ package com.onestep.server.entity; -import jakarta.persistence.*; +import javax.persistence.*; import lombok.*; import org.hibernate.annotations.ColumnDefault; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/entity/Comment.java b/src/main/java/com/onestep/server/entity/Comment.java index 4f5f545..ff2e35f 100644 --- a/src/main/java/com/onestep/server/entity/Comment.java +++ b/src/main/java/com/onestep/server/entity/Comment.java @@ -1,8 +1,8 @@ package com.onestep.server.entity; -import jakarta.persistence.*; +import javax.persistence.*; import lombok.*; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/entity/Family.java b/src/main/java/com/onestep/server/entity/Family.java index 33f5569..77662a5 100644 --- a/src/main/java/com/onestep/server/entity/Family.java +++ b/src/main/java/com/onestep/server/entity/Family.java @@ -1,13 +1,13 @@ package com.onestep.server.entity; import com.fasterxml.jackson.annotation.JsonIgnore; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; import lombok.*; import org.hibernate.annotations.ColumnDefault; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/entity/Letter.java b/src/main/java/com/onestep/server/entity/Letter.java index d1cfda4..5659812 100644 --- a/src/main/java/com/onestep/server/entity/Letter.java +++ b/src/main/java/com/onestep/server/entity/Letter.java @@ -1,8 +1,8 @@ package com.onestep.server.entity; -import jakarta.persistence.*; +import javax.persistence.*; import lombok.*; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/entity/PhotoBook.java b/src/main/java/com/onestep/server/entity/PhotoBook.java index aedbc55..5f8a2d5 100644 --- a/src/main/java/com/onestep/server/entity/PhotoBook.java +++ b/src/main/java/com/onestep/server/entity/PhotoBook.java @@ -1,8 +1,8 @@ package com.onestep.server.entity; -import jakarta.persistence.*; +import javax.persistence.*; import lombok.*; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/entity/Question.java b/src/main/java/com/onestep/server/entity/Question.java index 3f46b0a..185e9f3 100644 --- a/src/main/java/com/onestep/server/entity/Question.java +++ b/src/main/java/com/onestep/server/entity/Question.java @@ -1,10 +1,10 @@ package com.onestep.server.entity; -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.JoinColumn; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.JoinColumn; import lombok.*; -import jakarta.persistence.Id; +import javax.persistence.Id; @ToString @Getter diff --git a/src/main/java/com/onestep/server/entity/Quiz.java b/src/main/java/com/onestep/server/entity/Quiz.java index c54d5ad..843bb81 100644 --- a/src/main/java/com/onestep/server/entity/Quiz.java +++ b/src/main/java/com/onestep/server/entity/Quiz.java @@ -1,8 +1,8 @@ package com.onestep.server.entity; -import jakarta.persistence.*; +import javax.persistence.*; import lombok.*; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/entity/User.java b/src/main/java/com/onestep/server/entity/User.java index bb41c5c..25b3e42 100644 --- a/src/main/java/com/onestep/server/entity/User.java +++ b/src/main/java/com/onestep/server/entity/User.java @@ -1,9 +1,9 @@ package com.onestep.server.entity; import com.fasterxml.jackson.annotation.JsonIgnore; -import jakarta.persistence.*; +import javax.persistence.*; import lombok.*; -import jakarta.persistence.Id; +import javax.persistence.Id; import java.util.Date; diff --git a/src/main/java/com/onestep/server/service/image/S3Uploader.java b/src/main/java/com/onestep/server/service/image/S3Uploader.java index c65e602..50abb4c 100644 --- a/src/main/java/com/onestep/server/service/image/S3Uploader.java +++ b/src/main/java/com/onestep/server/service/image/S3Uploader.java @@ -3,7 +3,7 @@ import com.amazonaws.services.s3.AmazonS3Client; import com.amazonaws.services.s3.model.CannedAccessControlList; import com.amazonaws.services.s3.model.PutObjectRequest; -import jakarta.persistence.PersistenceContext; +import javax.persistence.PersistenceContext; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired;