From 1e72d8be266877836b02596a044e6f6490f50a30 Mon Sep 17 00:00:00 2001 From: Jinwook Kim Date: Tue, 17 Oct 2023 23:14:09 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=EC=8A=A4=ED=94=84=EB=A7=81=20?= =?UTF-8?q?=EB=B6=80=ED=8A=B8=20=EB=B2=84=EC=A0=84=20=EB=B3=80=EA=B2=BD:?= =?UTF-8?q?=202.7.3=20=E2=86=92=203.1.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/build.gradle b/backend/build.gradle index bb0e4114..186e3e1d 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.springframework.boot' version '2.7.3' + id 'org.springframework.boot' version '3.1.4' id 'io.spring.dependency-management' version '1.0.13.RELEASE' id "org.asciidoctor.jvm.convert" version "3.3.2" id 'java' From 76f139fead6e02ed6069938f22c4644cc38d2f67 Mon Sep 17 00:00:00 2001 From: Jinwook Kim Date: Tue, 17 Oct 2023 23:15:04 +0900 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20Querydsl=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index 186e3e1d..86f93cbe 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -3,7 +3,6 @@ plugins { id 'io.spring.dependency-management' version '1.0.13.RELEASE' id "org.asciidoctor.jvm.convert" version "3.3.2" id 'java' - id "com.ewerk.gradle.plugins.querydsl" version "1.0.10" id 'jacoco' } @@ -12,7 +11,6 @@ version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' configurations { - querydsl.extendsFrom compileClasspath asciidoctorExt compileOnly { extendsFrom annotationProcessor @@ -35,8 +33,10 @@ dependencies { implementation 'com.amazonaws:aws-java-sdk-s3' implementation 'com.amazonaws.secretsmanager:aws-secretsmanager-caching-java:1.0.2' implementation 'org.apache.tika:tika-core:1.26' - implementation 'com.querydsl:querydsl-jpa:5.0.0' - annotationProcessor 'com.querydsl:querydsl-apt:5.0.0' + implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' + annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta" + annotationProcessor "jakarta.annotation:jakarta.annotation-api" + annotationProcessor "jakarta.persistence:jakarta.persistence-api" implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'io.jsonwebtoken:jjwt-api:0.11.5' implementation 'junit:junit:4.13.1' @@ -154,17 +154,3 @@ bootJar { dependsOn buildDocument enabled = true } - -// Querydsl -def querydslDir = "$buildDir/generated/querydsl" - -querydsl { - jpa = true - querydslSourcesDir = querydslDir -} -sourceSets { - main.java.srcDir querydslDir -} -compileQuerydsl { - options.annotationProcessorPath = configurations.querydsl -} \ No newline at end of file From 503dec9d879cced494bdbfcde24aa8e1e900d918 Mon Sep 17 00:00:00 2001 From: Jinwook Kim Date: Tue, 17 Oct 2023 23:15:44 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=EA=B8=B0=ED=83=80=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=ED=98=B8=ED=99=98=20?= =?UTF-8?q?=EB=90=98=EB=8F=84=EB=A1=9D=20=EB=B2=84=EC=A0=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index 86f93cbe..97edec24 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -45,19 +45,19 @@ dependencies { implementation 'com.google.api-client:google-api-client:1.32.1' implementation 'com.google.http-client:google-http-client-jackson2:1.31.0' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.0' - implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.3' + implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5' implementation 'net.rakugakibox.spring.boot:logback-access-spring-boot-starter:2.7.1' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' + implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0' implementation 'org.jsoup:jsoup:1.13.1' implementation 'com.github.vladimir-bukhtoyarov:bucket4j-core:7.6.0' implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'io.rest-assured:rest-assured:4.5.1' + testImplementation 'io.rest-assured:rest-assured' compileOnly "org.flywaydb:flyway-mysql" compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' - runtimeOnly 'mysql:mysql-connector-java' + runtimeOnly 'mysql:mysql-connector-java:8.0.33' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:2.7.9' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' From 5e2e94d4d4f68fe758583dea5027d856e6f8f426 Mon Sep 17 00:00:00 2001 From: Jinwook Kim Date: Tue, 17 Oct 2023 23:17:12 +0900 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20redis=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=98=95=EC=8B=9D=20=EB=B3=80=EA=B2=BD=20(application.yml)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/application-dev.yml | 7 ++++--- backend/src/main/resources/application-prod.yml | 7 ++++--- backend/src/main/resources/application-staging.yml | 7 ++++--- backend/src/test/resources/application.yml | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/backend/src/main/resources/application-dev.yml b/backend/src/main/resources/application-dev.yml index b2dcc85d..12d3f347 100644 --- a/backend/src/main/resources/application-dev.yml +++ b/backend/src/main/resources/application-dev.yml @@ -7,6 +7,10 @@ spring: hikari: leakDetectionThreshold: 10000 maximum-pool-size: 10 + data: + redis: + host: localhost + port: 6379 jpa: open-in-view: false # if true: SSE 커넥션 열려있는 동안 DB 커넥션도 열려있음 => Connection leak hibernate: @@ -17,9 +21,6 @@ spring: path: /h2-console flyway: enabled: false - redis: - host: localhost - port: 6379 decorator: datasource: diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index b5ce9a2b..a4410672 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -9,6 +9,10 @@ spring: hikari: leakDetectionThreshold: 10000 maximum-pool-size: 20 + data: + redis: + host: ENC(4D3x72p+EQpt5L33Wi0w1Xm5abOKIbGshV/j2y0DEPLYV/q3X4PJHb5K1OXorsyGa00ZGR7w74Z9MlN1PsdQ/n/eId/7Zp96) + port: 6379 jpa: open-in-view: false # if true: SSE 커넥션 열려있는 동안 DB 커넥션도 열려있음 => Connection leak hibernate: @@ -21,9 +25,6 @@ spring: connection: characterEncoding: utf8mb4 charSet: utf8mb4 - redis: - host: ENC(4D3x72p+EQpt5L33Wi0w1Xm5abOKIbGshV/j2y0DEPLYV/q3X4PJHb5K1OXorsyGa00ZGR7w74Z9MlN1PsdQ/n/eId/7Zp96) - port: 6379 flyway: enabled: true baseline-on-migrate: true diff --git a/backend/src/main/resources/application-staging.yml b/backend/src/main/resources/application-staging.yml index 82dedd25..f429bcbe 100644 --- a/backend/src/main/resources/application-staging.yml +++ b/backend/src/main/resources/application-staging.yml @@ -9,6 +9,10 @@ spring: hikari: leakDetectionThreshold: 10000 maximum-pool-size: 20 + data: + redis: + host: ENC(jEvMbZFxfZLTb0i42wiZKQelUtpPn1+yZnS0qInY4dkyYqKCdvZTxb2gNvaIABtbCMxa22+X0OLWeFpRMWusJ0cH5CeF36lH) + port: 6379 jpa: open-in-view: false # if true: SSE 커넥션 열려있는 동안 DB 커넥션도 열려있음 => Connection leak hibernate: @@ -21,9 +25,6 @@ spring: connection: characterEncoding: utf8mb4 charSet: utf8mb4 - redis: - host: ENC(jEvMbZFxfZLTb0i42wiZKQelUtpPn1+yZnS0qInY4dkyYqKCdvZTxb2gNvaIABtbCMxa22+X0OLWeFpRMWusJ0cH5CeF36lH) - port: 6379 flyway: enabled: true baseline-on-migrate: true diff --git a/backend/src/test/resources/application.yml b/backend/src/test/resources/application.yml index 66d21821..63be522b 100644 --- a/backend/src/test/resources/application.yml +++ b/backend/src/test/resources/application.yml @@ -12,15 +12,16 @@ spring: username: sa password: driver-class-name: org.h2.Driver + data: + redis: + host: localhost + port: 6379 jpa: hibernate: ddl-auto: create properties: hibernate: format_sql: true - redis: - host: localhost - port: 6379 cloud: aws: From d171617592a884f5d68f541985a5d845e08b4682 Mon Sep 17 00:00:00 2001 From: Jinwook Kim Date: Tue, 17 Oct 2023 23:20:07 +0900 Subject: [PATCH 5/6] =?UTF-8?q?feat:=20=EC=BB=A8=ED=8A=B8=EB=A1=A4?= =?UTF-8?q?=EB=9F=AC=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=20Deprecated=20API=20=EC=82=AC=EC=9A=A9=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/com/bootme/util/ControllerTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/src/test/java/com/bootme/util/ControllerTest.java b/backend/src/test/java/com/bootme/util/ControllerTest.java index 8926632b..c67ae154 100644 --- a/backend/src/test/java/com/bootme/util/ControllerTest.java +++ b/backend/src/test/java/com/bootme/util/ControllerTest.java @@ -122,11 +122,10 @@ private void setMockMvcRestDocsSpec(final WebApplicationContext context, .removePort(), prettyPrint() ).withResponseDefaults( - removeHeaders( - "Transfer-Encoding", - "Date", - "Keep-Alive", - "Connection"), + modifyHeaders().remove("Transfer-Encoding"), + modifyHeaders().remove("Date"), + modifyHeaders().remove("Keep-Alive"), + modifyHeaders().remove("Connection"), prettyPrint() ) ).build(); From 16bf463679907e23c794540cd17d383ea6f4b92b Mon Sep 17 00:00:00 2001 From: Jinwook Kim Date: Tue, 17 Oct 2023 23:23:47 +0900 Subject: [PATCH 6/6] =?UTF-8?q?feat:=20import=20=ED=8C=A8=ED=82=A4?= =?UTF-8?q?=EC=A7=80=20=EB=B3=80=EA=B2=BD=20(javax=20=E2=86=92=20jakarta)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bootme/auth/controller/AuthController.java | 2 +- .../bootme/auth/util/AuthenticationArgumentResolver.java | 3 +-- .../main/java/com/bootme/bookmark/domain/Bookmark.java | 5 ++--- .../java/com/bootme/bookmark/domain/CommentBookmark.java | 7 +++---- .../java/com/bootme/bookmark/domain/CourseBookmark.java | 7 +++---- .../java/com/bootme/bookmark/domain/PostBookmark.java | 7 +++---- .../com/bootme/comment/controller/CommentController.java | 2 +- .../src/main/java/com/bootme/comment/domain/Comment.java | 6 +++--- .../main/java/com/bootme/comment/dto/CommentRequest.java | 2 +- .../main/java/com/bootme/common/domain/BaseEntity.java | 6 +++--- .../bootme/common/exception/GlobalExceptionHandler.java | 5 ++--- .../java/com/bootme/common/filter/MDCLoggingFilter.java | 3 ++- .../com/bootme/common/interceptor/IPInterceptor.java | 4 ++-- .../bootme/common/interceptor/RateLimitInterceptor.java | 5 ++--- .../common/interceptor/TokenValidationInterceptor.java | 5 ++--- .../main/java/com/bootme/common/util/RequestUtils.java | 4 ++-- .../main/java/com/bootme/config/P6SpySqlFormatter.java | 2 +- .../src/main/java/com/bootme/config/RateLimitConfig.java | 2 +- backend/src/main/java/com/bootme/config/RedisConfig.java | 4 ++-- .../com/bootme/course/controller/CompanyController.java | 2 +- .../com/bootme/course/controller/CourseController.java | 3 +-- .../main/java/com/bootme/course/domain/Categories.java | 3 ++- .../src/main/java/com/bootme/course/domain/Company.java | 6 +++--- .../src/main/java/com/bootme/course/domain/Course.java | 6 +++--- .../main/java/com/bootme/course/domain/CourseStack.java | 5 ++--- .../src/main/java/com/bootme/course/domain/Dates.java | 4 ++-- .../main/java/com/bootme/course/dto/CompanyRequest.java | 4 ++-- .../java/com/bootme/course/dto/CourseDetailRequest.java | 3 +-- .../main/java/com/bootme/course/dto/CourseRequest.java | 4 ++-- .../src/main/java/com/bootme/gpt/dto/MessageRequest.java | 3 +-- .../src/main/java/com/bootme/member/domain/Member.java | 9 ++++----- .../main/java/com/bootme/member/domain/MemberStack.java | 5 ++--- .../main/java/com/bootme/member/domain/OauthInfo.java | 3 +-- .../com/bootme/notification/domain/Notification.java | 5 ++--- .../java/com/bootme/post/controller/PostController.java | 2 +- .../src/main/java/com/bootme/post/domain/Content.java | 9 ++++----- backend/src/main/java/com/bootme/post/domain/Post.java | 6 +++--- backend/src/main/java/com/bootme/post/domain/Title.java | 7 +++---- .../src/main/java/com/bootme/post/dto/PostRequest.java | 3 +-- .../com/bootme/prompt/controller/PromptController.java | 3 +-- .../com/bootme/prompt/dto/PromptGenerationRequest.java | 2 +- .../com/bootme/prompt/dto/PromptSubmissionRequest.java | 3 +-- .../java/com/bootme/session/service/SessionService.java | 3 ++- backend/src/main/java/com/bootme/stack/domain/Stack.java | 2 +- .../java/com/bootme/vote/controller/VoteController.java | 3 +-- backend/src/main/java/com/bootme/vote/domain/Vote.java | 5 ++--- .../src/main/java/com/bootme/vote/dto/VoteRequest.java | 5 ++--- 47 files changed, 89 insertions(+), 110 deletions(-) diff --git a/backend/src/main/java/com/bootme/auth/controller/AuthController.java b/backend/src/main/java/com/bootme/auth/controller/AuthController.java index 9f667168..8270a970 100644 --- a/backend/src/main/java/com/bootme/auth/controller/AuthController.java +++ b/backend/src/main/java/com/bootme/auth/controller/AuthController.java @@ -4,12 +4,12 @@ import com.bootme.auth.dto.LoginResponse; import com.bootme.auth.service.AuthService; import com.bootme.auth.util.TokenProvider; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.util.Map; @RestController diff --git a/backend/src/main/java/com/bootme/auth/util/AuthenticationArgumentResolver.java b/backend/src/main/java/com/bootme/auth/util/AuthenticationArgumentResolver.java index 090479d8..13499450 100644 --- a/backend/src/main/java/com/bootme/auth/util/AuthenticationArgumentResolver.java +++ b/backend/src/main/java/com/bootme/auth/util/AuthenticationArgumentResolver.java @@ -1,6 +1,7 @@ package com.bootme.auth.util; import com.bootme.auth.dto.AuthInfo; +import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import org.springframework.core.MethodParameter; import org.springframework.stereotype.Component; @@ -9,8 +10,6 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.ModelAndViewContainer; -import javax.servlet.http.HttpServletRequest; - import static com.bootme.common.util.RequestUtils.getCookieValue; @Component diff --git a/backend/src/main/java/com/bootme/bookmark/domain/Bookmark.java b/backend/src/main/java/com/bootme/bookmark/domain/Bookmark.java index 8db38c4f..a882f33f 100644 --- a/backend/src/main/java/com/bootme/bookmark/domain/Bookmark.java +++ b/backend/src/main/java/com/bootme/bookmark/domain/Bookmark.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.member.domain.Member; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/bookmark/domain/CommentBookmark.java b/backend/src/main/java/com/bootme/bookmark/domain/CommentBookmark.java index 4faa8f5d..ee274528 100644 --- a/backend/src/main/java/com/bootme/bookmark/domain/CommentBookmark.java +++ b/backend/src/main/java/com/bootme/bookmark/domain/CommentBookmark.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.comment.domain.Comment; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.CascadeType.ALL; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.ALL; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/bookmark/domain/CourseBookmark.java b/backend/src/main/java/com/bootme/bookmark/domain/CourseBookmark.java index 3e32cc8d..be821918 100644 --- a/backend/src/main/java/com/bootme/bookmark/domain/CourseBookmark.java +++ b/backend/src/main/java/com/bootme/bookmark/domain/CourseBookmark.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.course.domain.Course; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.CascadeType.ALL; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.ALL; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/bookmark/domain/PostBookmark.java b/backend/src/main/java/com/bootme/bookmark/domain/PostBookmark.java index 086c961c..b7a0feac 100644 --- a/backend/src/main/java/com/bootme/bookmark/domain/PostBookmark.java +++ b/backend/src/main/java/com/bootme/bookmark/domain/PostBookmark.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.post.domain.Post; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.CascadeType.ALL; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.ALL; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/comment/controller/CommentController.java b/backend/src/main/java/com/bootme/comment/controller/CommentController.java index 3b3b4518..16402cee 100644 --- a/backend/src/main/java/com/bootme/comment/controller/CommentController.java +++ b/backend/src/main/java/com/bootme/comment/controller/CommentController.java @@ -5,11 +5,11 @@ import com.bootme.comment.dto.CommentRequest; import com.bootme.comment.dto.CommentResponse; import com.bootme.comment.service.CommentService; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; import java.net.URI; @RestController diff --git a/backend/src/main/java/com/bootme/comment/domain/Comment.java b/backend/src/main/java/com/bootme/comment/domain/Comment.java index 9a57dde0..3109e1f5 100644 --- a/backend/src/main/java/com/bootme/comment/domain/Comment.java +++ b/backend/src/main/java/com/bootme/comment/domain/Comment.java @@ -6,6 +6,7 @@ import com.bootme.common.exception.ValidationException; import com.bootme.member.domain.Member; import com.bootme.post.domain.Post; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -14,15 +15,14 @@ import org.jsoup.nodes.Document; import org.jsoup.select.Elements; -import javax.persistence.*; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; import static com.bootme.common.exception.ErrorType.*; -import static javax.persistence.CascadeType.PERSIST; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.PERSIST; +import static jakarta.persistence.FetchType.LAZY; @Entity @Getter diff --git a/backend/src/main/java/com/bootme/comment/dto/CommentRequest.java b/backend/src/main/java/com/bootme/comment/dto/CommentRequest.java index 544fee22..8d868d09 100644 --- a/backend/src/main/java/com/bootme/comment/dto/CommentRequest.java +++ b/backend/src/main/java/com/bootme/comment/dto/CommentRequest.java @@ -1,10 +1,10 @@ package com.bootme.comment.dto; +import jakarta.validation.constraints.NotBlank; import lombok.AllArgsConstructor; import lombok.Getter; import javax.annotation.Nullable; -import javax.validation.constraints.NotBlank; @Getter @AllArgsConstructor diff --git a/backend/src/main/java/com/bootme/common/domain/BaseEntity.java b/backend/src/main/java/com/bootme/common/domain/BaseEntity.java index 609ada5b..62f566d2 100644 --- a/backend/src/main/java/com/bootme/common/domain/BaseEntity.java +++ b/backend/src/main/java/com/bootme/common/domain/BaseEntity.java @@ -1,14 +1,14 @@ package com.bootme.common.domain; +import jakarta.persistence.Column; +import jakarta.persistence.EntityListeners; +import jakarta.persistence.MappedSuperclass; import lombok.Getter; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.LocalDateTime; -import javax.persistence.Column; -import javax.persistence.EntityListeners; -import javax.persistence.MappedSuperclass; @EntityListeners(AuditingEntityListener.class) @MappedSuperclass diff --git a/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java b/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java index 773c1a00..74849a9f 100644 --- a/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java +++ b/backend/src/main/java/com/bootme/common/exception/GlobalExceptionHandler.java @@ -1,6 +1,8 @@ package com.bootme.common.exception; import com.fasterxml.jackson.core.JsonProcessingException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Value; @@ -9,9 +11,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import static com.bootme.common.exception.ErrorType.NOT_FOUND_MEMBER; import static com.bootme.common.exception.ErrorType.RUNTIME_EXCEPTION; import static com.bootme.common.util.RequestUtils.getRequestInfo; diff --git a/backend/src/main/java/com/bootme/common/filter/MDCLoggingFilter.java b/backend/src/main/java/com/bootme/common/filter/MDCLoggingFilter.java index 8caaa0b6..9dba1e0b 100644 --- a/backend/src/main/java/com/bootme/common/filter/MDCLoggingFilter.java +++ b/backend/src/main/java/com/bootme/common/filter/MDCLoggingFilter.java @@ -1,11 +1,11 @@ package com.bootme.common.filter; +import jakarta.servlet.*; import org.slf4j.MDC; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -import javax.servlet.*; import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; @@ -33,4 +33,5 @@ public void doFilter(final ServletRequest servletRequest, final ServletResponse MDC.remove("requestId"); } } + } diff --git a/backend/src/main/java/com/bootme/common/interceptor/IPInterceptor.java b/backend/src/main/java/com/bootme/common/interceptor/IPInterceptor.java index 0e9cd244..1bbefedb 100644 --- a/backend/src/main/java/com/bootme/common/interceptor/IPInterceptor.java +++ b/backend/src/main/java/com/bootme/common/interceptor/IPInterceptor.java @@ -2,13 +2,13 @@ import com.bootme.auth.util.IPFilter; import com.bootme.common.exception.AccessDeniedException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.HandlerInterceptor; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; diff --git a/backend/src/main/java/com/bootme/common/interceptor/RateLimitInterceptor.java b/backend/src/main/java/com/bootme/common/interceptor/RateLimitInterceptor.java index ee9014b8..517be576 100644 --- a/backend/src/main/java/com/bootme/common/interceptor/RateLimitInterceptor.java +++ b/backend/src/main/java/com/bootme/common/interceptor/RateLimitInterceptor.java @@ -1,15 +1,14 @@ package com.bootme.common.interceptor; import com.bootme.config.RateLimitConfig; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import io.github.bucket4j.Bucket; import io.github.bucket4j.ConsumptionProbe; diff --git a/backend/src/main/java/com/bootme/common/interceptor/TokenValidationInterceptor.java b/backend/src/main/java/com/bootme/common/interceptor/TokenValidationInterceptor.java index ad4b6b9d..c77b4335 100644 --- a/backend/src/main/java/com/bootme/common/interceptor/TokenValidationInterceptor.java +++ b/backend/src/main/java/com/bootme/common/interceptor/TokenValidationInterceptor.java @@ -2,13 +2,12 @@ import com.bootme.auth.service.AuthService; import com.bootme.auth.util.TokenProvider; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import static com.bootme.common.util.RequestUtils.getCookieValue; /** diff --git a/backend/src/main/java/com/bootme/common/util/RequestUtils.java b/backend/src/main/java/com/bootme/common/util/RequestUtils.java index a40fdd22..b5ca18a6 100644 --- a/backend/src/main/java/com/bootme/common/util/RequestUtils.java +++ b/backend/src/main/java/com/bootme/common/util/RequestUtils.java @@ -3,10 +3,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; import java.util.Arrays; import java.util.HashMap; import java.util.Map; diff --git a/backend/src/main/java/com/bootme/config/P6SpySqlFormatter.java b/backend/src/main/java/com/bootme/config/P6SpySqlFormatter.java index 38b85342..d9c6ba40 100644 --- a/backend/src/main/java/com/bootme/config/P6SpySqlFormatter.java +++ b/backend/src/main/java/com/bootme/config/P6SpySqlFormatter.java @@ -3,11 +3,11 @@ import com.p6spy.engine.logging.Category; import com.p6spy.engine.spy.P6SpyOptions; import com.p6spy.engine.spy.appender.MessageFormattingStrategy; +import jakarta.annotation.PostConstruct; import org.hibernate.engine.jdbc.internal.FormatStyle; import org.springframework.context.annotation.Configuration; import org.springframework.util.ClassUtils; -import javax.annotation.PostConstruct; import java.util.Arrays; import java.util.Locale; import java.util.Optional; diff --git a/backend/src/main/java/com/bootme/config/RateLimitConfig.java b/backend/src/main/java/com/bootme/config/RateLimitConfig.java index e3fbe94d..e4e3ffc1 100644 --- a/backend/src/main/java/com/bootme/config/RateLimitConfig.java +++ b/backend/src/main/java/com/bootme/config/RateLimitConfig.java @@ -3,9 +3,9 @@ import io.github.bucket4j.Bandwidth; import io.github.bucket4j.Bucket; import io.github.bucket4j.Refill; +import jakarta.annotation.PostConstruct; import org.springframework.context.annotation.Configuration; -import javax.annotation.PostConstruct; import java.time.Duration; import java.util.HashMap; import java.util.Map; diff --git a/backend/src/main/java/com/bootme/config/RedisConfig.java b/backend/src/main/java/com/bootme/config/RedisConfig.java index e8954343..d8ede945 100644 --- a/backend/src/main/java/com/bootme/config/RedisConfig.java +++ b/backend/src/main/java/com/bootme/config/RedisConfig.java @@ -13,10 +13,10 @@ @Configuration public class RedisConfig { - @Value("${spring.redis.host}") + @Value("${spring.data.redis.host}") private String redisHost; - @Value("${spring.redis.port}") + @Value("${spring.data.redis.port}") private int redisPort; @Bean diff --git a/backend/src/main/java/com/bootme/course/controller/CompanyController.java b/backend/src/main/java/com/bootme/course/controller/CompanyController.java index 603644e8..a42d6800 100644 --- a/backend/src/main/java/com/bootme/course/controller/CompanyController.java +++ b/backend/src/main/java/com/bootme/course/controller/CompanyController.java @@ -3,13 +3,13 @@ import com.bootme.course.dto.CompanyRequest; import com.bootme.course.dto.CompanyResponse; import com.bootme.course.service.CompanyService; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; import java.util.List; @RestController diff --git a/backend/src/main/java/com/bootme/course/controller/CourseController.java b/backend/src/main/java/com/bootme/course/controller/CourseController.java index 4f6d6bf5..eae31a32 100644 --- a/backend/src/main/java/com/bootme/course/controller/CourseController.java +++ b/backend/src/main/java/com/bootme/course/controller/CourseController.java @@ -7,6 +7,7 @@ import com.bootme.course.dto.CourseRequest; import com.bootme.course.dto.CourseResponse; import com.bootme.course.service.CourseService; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; @@ -15,8 +16,6 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; - @RestController @RequestMapping("/courses") @RequiredArgsConstructor diff --git a/backend/src/main/java/com/bootme/course/domain/Categories.java b/backend/src/main/java/com/bootme/course/domain/Categories.java index 9eda4294..7c7df524 100644 --- a/backend/src/main/java/com/bootme/course/domain/Categories.java +++ b/backend/src/main/java/com/bootme/course/domain/Categories.java @@ -1,6 +1,7 @@ package com.bootme.course.domain; -import javax.persistence.*; +import jakarta.persistence.*; + import java.util.ArrayList; import java.util.List; diff --git a/backend/src/main/java/com/bootme/course/domain/Company.java b/backend/src/main/java/com/bootme/course/domain/Company.java index 8aa8a5c8..e2dffdbf 100644 --- a/backend/src/main/java/com/bootme/course/domain/Company.java +++ b/backend/src/main/java/com/bootme/course/domain/Company.java @@ -2,17 +2,17 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.course.dto.CompanyRequest; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; import java.util.ArrayList; import java.util.List; -import static javax.persistence.CascadeType.PERSIST; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.PERSIST; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/course/domain/Course.java b/backend/src/main/java/com/bootme/course/domain/Course.java index f8b01dd6..4d685505 100644 --- a/backend/src/main/java/com/bootme/course/domain/Course.java +++ b/backend/src/main/java/com/bootme/course/domain/Course.java @@ -5,19 +5,19 @@ import com.bootme.common.domain.Clickable; import com.bootme.course.dto.CourseRequest; import com.bootme.notification.domain.NotificationEventType; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import static com.bootme.notification.domain.NotificationEventType.*; -import static javax.persistence.CascadeType.PERSIST; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.PERSIST; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/course/domain/CourseStack.java b/backend/src/main/java/com/bootme/course/domain/CourseStack.java index 2ae39172..981cd975 100644 --- a/backend/src/main/java/com/bootme/course/domain/CourseStack.java +++ b/backend/src/main/java/com/bootme/course/domain/CourseStack.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.stack.domain.Stack; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.FetchType.*; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/course/domain/Dates.java b/backend/src/main/java/com/bootme/course/domain/Dates.java index b0116e4a..f76d65cf 100644 --- a/backend/src/main/java/com/bootme/course/domain/Dates.java +++ b/backend/src/main/java/com/bootme/course/domain/Dates.java @@ -1,12 +1,12 @@ package com.bootme.course.domain; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; import java.time.LocalDate; @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/backend/src/main/java/com/bootme/course/dto/CompanyRequest.java b/backend/src/main/java/com/bootme/course/dto/CompanyRequest.java index c343fd19..820eb424 100644 --- a/backend/src/main/java/com/bootme/course/dto/CompanyRequest.java +++ b/backend/src/main/java/com/bootme/course/dto/CompanyRequest.java @@ -1,10 +1,9 @@ package com.bootme.course.dto; +import jakarta.validation.constraints.NotBlank; import lombok.Builder; import lombok.Getter; -import javax.validation.constraints.NotBlank; - @Getter public class CompanyRequest { @@ -35,4 +34,5 @@ public CompanyRequest(String name, String serviceName, String url, this.serviceUrl = serviceUrl; this.logoUrl = logoUrl; } + } diff --git a/backend/src/main/java/com/bootme/course/dto/CourseDetailRequest.java b/backend/src/main/java/com/bootme/course/dto/CourseDetailRequest.java index 5d91c33f..14e2fe67 100644 --- a/backend/src/main/java/com/bootme/course/dto/CourseDetailRequest.java +++ b/backend/src/main/java/com/bootme/course/dto/CourseDetailRequest.java @@ -1,9 +1,8 @@ package com.bootme.course.dto; +import jakarta.validation.constraints.NotNull; import lombok.Getter; -import javax.validation.constraints.NotNull; - @Getter public class CourseDetailRequest { diff --git a/backend/src/main/java/com/bootme/course/dto/CourseRequest.java b/backend/src/main/java/com/bootme/course/dto/CourseRequest.java index bc384085..f61840c9 100644 --- a/backend/src/main/java/com/bootme/course/dto/CourseRequest.java +++ b/backend/src/main/java/com/bootme/course/dto/CourseRequest.java @@ -1,11 +1,11 @@ package com.bootme.course.dto; import com.bootme.course.domain.*; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; diff --git a/backend/src/main/java/com/bootme/gpt/dto/MessageRequest.java b/backend/src/main/java/com/bootme/gpt/dto/MessageRequest.java index 32b4a426..fa2a19ea 100644 --- a/backend/src/main/java/com/bootme/gpt/dto/MessageRequest.java +++ b/backend/src/main/java/com/bootme/gpt/dto/MessageRequest.java @@ -1,11 +1,10 @@ package com.bootme.gpt.dto; +import jakarta.validation.constraints.NotBlank; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; - @Getter @NoArgsConstructor @AllArgsConstructor diff --git a/backend/src/main/java/com/bootme/member/domain/Member.java b/backend/src/main/java/com/bootme/member/domain/Member.java index 9297a8ef..da5b49b3 100644 --- a/backend/src/main/java/com/bootme/member/domain/Member.java +++ b/backend/src/main/java/com/bootme/member/domain/Member.java @@ -5,20 +5,19 @@ import com.bootme.member.dto.UpdateImageRequest; import com.bootme.notification.domain.Notification; import com.bootme.stack.domain.Stack; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - import java.util.*; import java.util.stream.Collectors; import static com.bootme.common.exception.ErrorType.MEMBER_ID_MISMATCH; -import static javax.persistence.CascadeType.ALL; -import static javax.persistence.CascadeType.PERSIST; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.ALL; +import static jakarta.persistence.CascadeType.PERSIST; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/member/domain/MemberStack.java b/backend/src/main/java/com/bootme/member/domain/MemberStack.java index 20e0a2fc..6ea8d2b3 100644 --- a/backend/src/main/java/com/bootme/member/domain/MemberStack.java +++ b/backend/src/main/java/com/bootme/member/domain/MemberStack.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.stack.domain.Stack; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/member/domain/OauthInfo.java b/backend/src/main/java/com/bootme/member/domain/OauthInfo.java index 20e45bed..83592923 100644 --- a/backend/src/main/java/com/bootme/member/domain/OauthInfo.java +++ b/backend/src/main/java/com/bootme/member/domain/OauthInfo.java @@ -4,13 +4,12 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.common.exception.ArgumentNotValidException; import com.bootme.common.exception.ErrorType; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter @Entity diff --git a/backend/src/main/java/com/bootme/notification/domain/Notification.java b/backend/src/main/java/com/bootme/notification/domain/Notification.java index 791cb235..ca642355 100644 --- a/backend/src/main/java/com/bootme/notification/domain/Notification.java +++ b/backend/src/main/java/com/bootme/notification/domain/Notification.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.member.domain.Member; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.FetchType.LAZY; @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter diff --git a/backend/src/main/java/com/bootme/post/controller/PostController.java b/backend/src/main/java/com/bootme/post/controller/PostController.java index e530e2a8..fc3566bb 100644 --- a/backend/src/main/java/com/bootme/post/controller/PostController.java +++ b/backend/src/main/java/com/bootme/post/controller/PostController.java @@ -7,6 +7,7 @@ import com.bootme.post.dto.PostRequest; import com.bootme.post.dto.PostResponse; import com.bootme.post.service.PostService; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.http.HttpHeaders; @@ -14,7 +15,6 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; import java.net.URI; import java.util.List; diff --git a/backend/src/main/java/com/bootme/post/domain/Content.java b/backend/src/main/java/com/bootme/post/domain/Content.java index 4ddd02f6..d8a8dfb6 100644 --- a/backend/src/main/java/com/bootme/post/domain/Content.java +++ b/backend/src/main/java/com/bootme/post/domain/Content.java @@ -1,15 +1,15 @@ package com.bootme.post.domain; import com.bootme.common.exception.ValidationException; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Lob; import lombok.Getter; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Lob; import java.util.Objects; import static com.bootme.common.exception.ErrorType.*; @@ -95,10 +95,9 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof Content)) { + if (!(o instanceof Content content)) { return false; } - Content content = (Content) o; return Objects.equals(value, content.value); } diff --git a/backend/src/main/java/com/bootme/post/domain/Post.java b/backend/src/main/java/com/bootme/post/domain/Post.java index c9905961..fcc79e75 100644 --- a/backend/src/main/java/com/bootme/post/domain/Post.java +++ b/backend/src/main/java/com/bootme/post/domain/Post.java @@ -8,18 +8,18 @@ import com.bootme.common.exception.AuthenticationException; import com.bootme.member.domain.Member; import com.bootme.post.dto.PostRequest; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; import java.util.ArrayList; import java.util.List; import static com.bootme.common.exception.ErrorType.NOT_WRITER; -import static javax.persistence.CascadeType.PERSIST; -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.CascadeType.PERSIST; +import static jakarta.persistence.FetchType.LAZY; /** * Indexes: diff --git a/backend/src/main/java/com/bootme/post/domain/Title.java b/backend/src/main/java/com/bootme/post/domain/Title.java index 3e0973b4..7195ee81 100644 --- a/backend/src/main/java/com/bootme/post/domain/Title.java +++ b/backend/src/main/java/com/bootme/post/domain/Title.java @@ -1,10 +1,10 @@ package com.bootme.post.domain; import com.bootme.common.exception.ValidationException; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; import lombok.Getter; -import javax.persistence.Column; -import javax.persistence.Embeddable; import java.util.Objects; import static com.bootme.common.exception.ErrorType.POST_TITLE_EMPTY; @@ -41,10 +41,9 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof Title)) { + if (!(o instanceof Title title)) { return false; } - Title title = (Title) o; return Objects.equals(value, title.value); } diff --git a/backend/src/main/java/com/bootme/post/dto/PostRequest.java b/backend/src/main/java/com/bootme/post/dto/PostRequest.java index 8caab8bf..1b241a4a 100644 --- a/backend/src/main/java/com/bootme/post/dto/PostRequest.java +++ b/backend/src/main/java/com/bootme/post/dto/PostRequest.java @@ -1,10 +1,9 @@ package com.bootme.post.dto; +import jakarta.validation.constraints.NotBlank; import lombok.Builder; import lombok.Getter; -import javax.validation.constraints.NotBlank; - @Getter public class PostRequest { diff --git a/backend/src/main/java/com/bootme/prompt/controller/PromptController.java b/backend/src/main/java/com/bootme/prompt/controller/PromptController.java index d317d0c5..3e68ec12 100644 --- a/backend/src/main/java/com/bootme/prompt/controller/PromptController.java +++ b/backend/src/main/java/com/bootme/prompt/controller/PromptController.java @@ -2,12 +2,11 @@ import com.bootme.prompt.dto.*; import com.bootme.prompt.service.PromptService; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import reactor.core.publisher.Mono; -import javax.validation.Valid; - @RestController @RequestMapping("/prompts") @RequiredArgsConstructor diff --git a/backend/src/main/java/com/bootme/prompt/dto/PromptGenerationRequest.java b/backend/src/main/java/com/bootme/prompt/dto/PromptGenerationRequest.java index 2eb4e6aa..8259698b 100644 --- a/backend/src/main/java/com/bootme/prompt/dto/PromptGenerationRequest.java +++ b/backend/src/main/java/com/bootme/prompt/dto/PromptGenerationRequest.java @@ -3,11 +3,11 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; +import jakarta.validation.constraints.NotBlank; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; import java.util.List; @Getter diff --git a/backend/src/main/java/com/bootme/prompt/dto/PromptSubmissionRequest.java b/backend/src/main/java/com/bootme/prompt/dto/PromptSubmissionRequest.java index 8c7028c9..4939bc1f 100644 --- a/backend/src/main/java/com/bootme/prompt/dto/PromptSubmissionRequest.java +++ b/backend/src/main/java/com/bootme/prompt/dto/PromptSubmissionRequest.java @@ -1,11 +1,10 @@ package com.bootme.prompt.dto; +import jakarta.validation.constraints.NotBlank; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; - @Getter @NoArgsConstructor @AllArgsConstructor diff --git a/backend/src/main/java/com/bootme/session/service/SessionService.java b/backend/src/main/java/com/bootme/session/service/SessionService.java index f7946648..a6d00849 100644 --- a/backend/src/main/java/com/bootme/session/service/SessionService.java +++ b/backend/src/main/java/com/bootme/session/service/SessionService.java @@ -1,9 +1,10 @@ package com.bootme.session.service; +import jakarta.servlet.http.HttpSession; import org.springframework.stereotype.Service; import org.springframework.web.context.request.ServletRequestAttributes; -import javax.servlet.http.HttpSession; + import java.util.HashSet; import java.util.Set; diff --git a/backend/src/main/java/com/bootme/stack/domain/Stack.java b/backend/src/main/java/com/bootme/stack/domain/Stack.java index 4610fadc..ca2413f3 100644 --- a/backend/src/main/java/com/bootme/stack/domain/Stack.java +++ b/backend/src/main/java/com/bootme/stack/domain/Stack.java @@ -3,11 +3,11 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.course.domain.CourseStack; import com.bootme.member.domain.MemberStack; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/backend/src/main/java/com/bootme/vote/controller/VoteController.java b/backend/src/main/java/com/bootme/vote/controller/VoteController.java index 1a4ad1b2..7f2722aa 100644 --- a/backend/src/main/java/com/bootme/vote/controller/VoteController.java +++ b/backend/src/main/java/com/bootme/vote/controller/VoteController.java @@ -5,14 +5,13 @@ import com.bootme.vote.dto.VotableResponse; import com.bootme.vote.dto.VoteRequest; import com.bootme.vote.service.VoteService; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; -import javax.validation.Valid; - @RestController @RequiredArgsConstructor public class VoteController { diff --git a/backend/src/main/java/com/bootme/vote/domain/Vote.java b/backend/src/main/java/com/bootme/vote/domain/Vote.java index 873fa526..60710191 100644 --- a/backend/src/main/java/com/bootme/vote/domain/Vote.java +++ b/backend/src/main/java/com/bootme/vote/domain/Vote.java @@ -2,14 +2,13 @@ import com.bootme.common.domain.BaseEntity; import com.bootme.member.domain.Member; +import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.*; - -import static javax.persistence.FetchType.LAZY; +import static jakarta.persistence.FetchType.LAZY; @Entity @Getter diff --git a/backend/src/main/java/com/bootme/vote/dto/VoteRequest.java b/backend/src/main/java/com/bootme/vote/dto/VoteRequest.java index f5e6eb95..744d90dc 100644 --- a/backend/src/main/java/com/bootme/vote/dto/VoteRequest.java +++ b/backend/src/main/java/com/bootme/vote/dto/VoteRequest.java @@ -1,11 +1,10 @@ package com.bootme.vote.dto; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - @Getter public class VoteRequest {