diff --git a/build.gradle b/build.gradle index 5e5f315ee..e9b82f90d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.springframework.boot' version '2.7.4' + id 'org.springframework.boot' version '3.2.0' id 'java' id "org.sonarqube" version "3.5.0.2730" id 'jacoco' diff --git a/jobis-application/src/main/java/team/retum/jobis/common/util/NumberUtil.java b/jobis-application/src/main/java/team/retum/jobis/common/util/NumberUtil.java index deaa2bb31..f69bfcacc 100644 --- a/jobis-application/src/main/java/team/retum/jobis/common/util/NumberUtil.java +++ b/jobis-application/src/main/java/team/retum/jobis/common/util/NumberUtil.java @@ -3,8 +3,6 @@ import lombok.AccessLevel; import lombok.NoArgsConstructor; -import java.util.List; - @NoArgsConstructor(access = AccessLevel.PRIVATE) public class NumberUtil { diff --git a/jobis-application/src/main/java/team/retum/jobis/domain/student/model/Student.java b/jobis-application/src/main/java/team/retum/jobis/domain/student/model/Student.java index 8819e8490..e96145313 100644 --- a/jobis-application/src/main/java/team/retum/jobis/domain/student/model/Student.java +++ b/jobis-application/src/main/java/team/retum/jobis/domain/student/model/Student.java @@ -5,7 +5,6 @@ import team.retum.jobis.common.annotation.Aggregate; import team.retum.jobis.domain.student.exception.ClassRoomNotFoundException; -import java.time.Period; import java.time.Year; @Getter diff --git a/jobis-infrastructure/build.gradle b/jobis-infrastructure/build.gradle index 86955bd19..9cc770bb3 100644 --- a/jobis-infrastructure/build.gradle +++ b/jobis-infrastructure/build.gradle @@ -3,15 +3,16 @@ dependencies { implementation(project(":jobis-application")) //persistence - runtimeOnly 'mysql:mysql-connector-java' + runtimeOnly 'com.mysql:mysql-connector-j' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-data-redis' //queryDSL - implementation 'com.querydsl:querydsl-jpa' + implementation "com.querydsl:querydsl-jpa:5.0.0:jakarta" + annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta" annotationProcessor( - "javax.persistence:javax.persistence-api", - "javax.annotation:javax.annotation-api", + "jakarta.persistence:jakarta.persistence-api", + "jakarta.annotation:jakarta.annotation-api", "com.querydsl:querydsl-apt:5.0.0:jpa") //web @@ -49,6 +50,10 @@ dependencies { // slack implementation 'net.gpedro.integrations.slack:slack-webhook:1.4.0' + + // jaxb + implementation 'javax.xml.bind:jaxb-api:2.3.0' + } test.useJUnitPlatform() diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/JobisApplication.java b/jobis-infrastructure/src/main/java/team/retum/jobis/JobisApplication.java index b95b24166..6b031f83e 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/JobisApplication.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/JobisApplication.java @@ -1,14 +1,18 @@ package team.retum.jobis; import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.cloud.commons.httpclient.HttpClientConfiguration; import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.cloud.openfeign.FeignAutoConfiguration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.scheduling.annotation.EnableScheduling; @ConfigurationPropertiesScan @EnableFeignClients +@ImportAutoConfiguration({FeignAutoConfiguration.class, HttpClientConfiguration.class}) @SpringBootApplication @EnableJpaAuditing @EnableScheduling diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/persistence/entity/AcceptanceEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/persistence/entity/AcceptanceEntity.java index 306a1f398..8bf72ed8c 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/persistence/entity/AcceptanceEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/persistence/entity/AcceptanceEntity.java @@ -1,5 +1,16 @@ package team.retum.jobis.domain.acceptance.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -8,17 +19,6 @@ import team.retum.jobis.domain.student.persistence.entity.StudentEntity; import team.retum.jobis.global.converter.StringListConverter; -import javax.persistence.Column; -import javax.persistence.Convert; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/AcceptanceWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/AcceptanceWebAdapter.java index 3e95ba3f4..e02d058ae 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/AcceptanceWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/AcceptanceWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.acceptance.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.DeleteMapping; @@ -22,8 +23,6 @@ import team.retum.jobis.domain.acceptance.usecase.RegisterFieldTraineeUseCase; import team.retum.jobis.domain.acceptance.usecase.TeacherQueryFieldTraineesAndContractWorkersUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/acceptances") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/ChangeContractDateWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/ChangeContractDateWebRequest.java index c12fcd55c..07e6549ce 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/ChangeContractDateWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/ChangeContractDateWebRequest.java @@ -1,11 +1,11 @@ package team.retum.jobis.domain.acceptance.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.acceptance.dto.request.ChangeContractDateRequest; import team.retum.jobis.global.annotation.ValidListElements; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/RegisterFieldTraineeWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/RegisterFieldTraineeWebRequest.java index 056f4dcb0..153962dc5 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/RegisterFieldTraineeWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/acceptance/presentation/dto/request/RegisterFieldTraineeWebRequest.java @@ -1,11 +1,11 @@ package team.retum.jobis.domain.acceptance.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.acceptance.dto.request.RegisterFieldTraineeRequest; import team.retum.jobis.global.annotation.ValidListElements; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationAttachmentEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationAttachmentEntity.java index df55c6196..d1a7f2d7b 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationAttachmentEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationAttachmentEntity.java @@ -1,17 +1,16 @@ package team.retum.jobis.domain.application.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.application.model.AttachmentType; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.validation.constraints.NotNull; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationEntity.java index 2eb8a0fba..6206419ca 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/persistence/entity/ApplicationEntity.java @@ -1,5 +1,19 @@ package team.retum.jobis.domain.application.persistence.entity; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -9,20 +23,6 @@ import team.retum.jobis.domain.student.persistence.entity.StudentEntity; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java index 7e8ce8820..b1154e931 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/ApplicationWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.application.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.DeleteMapping; @@ -27,9 +28,9 @@ import team.retum.jobis.domain.application.presentation.dto.request.RejectApplicationWebRequest; import team.retum.jobis.domain.application.usecase.ChangeApplicationsStatusUseCase; import team.retum.jobis.domain.application.usecase.ChangeFieldTrainDateUseCase; +import team.retum.jobis.domain.application.usecase.CompanyQueryApplicationsUseCase; import team.retum.jobis.domain.application.usecase.CreateApplicationUseCase; import team.retum.jobis.domain.application.usecase.DeleteApplicationUseCase; -import team.retum.jobis.domain.application.usecase.CompanyQueryApplicationsUseCase; import team.retum.jobis.domain.application.usecase.QueryEmploymentCountUseCase; import team.retum.jobis.domain.application.usecase.QueryPassedApplicationStudentsUseCase; import team.retum.jobis.domain.application.usecase.QueryRejectionReasonUseCase; @@ -38,8 +39,6 @@ import team.retum.jobis.domain.application.usecase.RejectApplicationUseCase; import team.retum.jobis.domain.application.usecase.TeacherQueryApplicationsUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/applications") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java index 635c5f649..3cd344549 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeApplicationsStatusWebRequest.java @@ -1,10 +1,10 @@ package team.retum.jobis.domain.application.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.application.model.ApplicationStatus; -import javax.validation.constraints.NotNull; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeFieldTrainDateWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeFieldTrainDateWebRequest.java index 9931c58a9..eca6dc440 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeFieldTrainDateWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/ChangeFieldTrainDateWebRequest.java @@ -1,11 +1,11 @@ package team.retum.jobis.domain.application.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.application.dto.request.ChangeFieldTrainDateRequest; import team.retum.jobis.global.annotation.ValidListElements; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/CreateApplicationWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/CreateApplicationWebRequest.java index 5f09051b6..b961f2b42 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/CreateApplicationWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/CreateApplicationWebRequest.java @@ -1,5 +1,7 @@ package team.retum.jobis.domain.application.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.application.dto.request.CreateApplicationRequest; @@ -7,8 +9,6 @@ import team.retum.jobis.domain.application.model.AttachmentType; import team.retum.jobis.global.annotation.ValidListElements; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/QueryApplicationsWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/QueryApplicationsWebRequest.java index 6bc29aac1..6a3c42204 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/QueryApplicationsWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/QueryApplicationsWebRequest.java @@ -1,12 +1,11 @@ package team.retum.jobis.domain.application.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; import team.retum.jobis.domain.application.model.ApplicationStatus; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - @Getter @Builder public class QueryApplicationsWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/RejectApplicationWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/RejectApplicationWebRequest.java index 0edb38bda..74edc5507 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/RejectApplicationWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/application/presentation/dto/request/RejectApplicationWebRequest.java @@ -1,12 +1,11 @@ package team.retum.jobis.domain.application.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class RejectApplicationWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/AuthWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/AuthWebAdapter.java index 14dd6a1db..ead31c335 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/AuthWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/AuthWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.auth.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PatchMapping; @@ -17,8 +18,6 @@ import team.retum.jobis.domain.auth.usecase.TokenReissueUseCase; import team.retum.jobis.domain.auth.usecase.VerifyAuthCodeUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/auth") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/SendAuthCodeWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/SendAuthCodeWebRequest.java index e92334fb0..9ebe9753e 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/SendAuthCodeWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/SendAuthCodeWebRequest.java @@ -1,15 +1,14 @@ package team.retum.jobis.domain.auth.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.auth.dto.SendAuthCodeRequest; import team.retum.jobis.domain.auth.model.AuthCodeType; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - @Getter @NoArgsConstructor public class SendAuthCodeWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/VerifyAuthCodeWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/VerifyAuthCodeWebRequest.java index 019660725..cd699892d 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/VerifyAuthCodeWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/auth/presentation/dto/request/VerifyAuthCodeWebRequest.java @@ -1,13 +1,12 @@ package team.retum.jobis.domain.auth.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class VerifyAuthCodeWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bookmark/persistence/entity/BookmarkEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bookmark/persistence/entity/BookmarkEntity.java index 1dca011b7..29a427037 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bookmark/persistence/entity/BookmarkEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bookmark/persistence/entity/BookmarkEntity.java @@ -1,5 +1,12 @@ package team.retum.jobis.domain.bookmark.persistence.entity; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -8,14 +15,6 @@ import team.retum.jobis.domain.student.persistence.entity.StudentEntity; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugAttachmentEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugAttachmentEntity.java index a3ce51e5b..4cb0dd2fd 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugAttachmentEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugAttachmentEntity.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.bug.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugReportEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugReportEntity.java index 8f673e6fd..de4a26183 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugReportEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/persistence/entity/BugReportEntity.java @@ -1,5 +1,19 @@ package team.retum.jobis.domain.bug.persistence.entity; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -8,20 +22,6 @@ import team.retum.jobis.domain.student.persistence.entity.StudentEntity; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/BugWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/BugWebAdapter.java index 8a2299c24..0fed68ea2 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/BugWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/BugWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.bug.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; @@ -18,8 +19,6 @@ import team.retum.jobis.domain.bug.usecase.QueryBugReportDetailsUseCase; import team.retum.jobis.domain.bug.usecase.QueryBugReportsUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/bugs") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/dto/request/CreateBugReportWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/dto/request/CreateBugReportWebRequest.java index e1148619a..604e63558 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/dto/request/CreateBugReportWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/bug/presentation/dto/request/CreateBugReportWebRequest.java @@ -1,13 +1,13 @@ package team.retum.jobis.domain.bug.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.bug.dto.CreateBugReportRequest; import team.retum.jobis.domain.bug.model.DevelopmentArea; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/CodeEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/CodeEntity.java index da2bb57ad..906e73c98 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/CodeEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/CodeEntity.java @@ -1,5 +1,17 @@ package team.retum.jobis.domain.code.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -7,19 +19,6 @@ import team.retum.jobis.domain.code.model.CodeType; import team.retum.jobis.domain.code.model.JobType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; - @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "tbl_code") diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeEntity.java index 4884d2651..003c5029e 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeEntity.java @@ -1,5 +1,14 @@ package team.retum.jobis.domain.code.persistence.entity; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapsId; +import jakarta.persistence.Table; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -7,16 +16,6 @@ import team.retum.jobis.domain.code.model.CodeType; import team.retum.jobis.domain.recruitment.persistence.entity.RecruitAreaEntity; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.MapsId; -import javax.persistence.Table; - @Getter @AllArgsConstructor diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeId.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeId.java index 6440e54ea..33d3c3bbe 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeId.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/code/persistence/entity/RecruitAreaCodeId.java @@ -1,12 +1,12 @@ package team.retum.jobis.domain.code.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Embeddable; import java.io.Serializable; @AllArgsConstructor diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/CompanyEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/CompanyEntity.java index 4a99a80b6..cb18a4a30 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/CompanyEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/CompanyEntity.java @@ -1,5 +1,19 @@ package team.retum.jobis.domain.company.persistence.entity; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.MapsId; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -14,20 +28,6 @@ import team.retum.jobis.global.converter.StringListConverter; import team.retum.jobis.global.util.ImageProperty; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Convert; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.MapsId; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Address.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Address.java index 6195bae84..cb031e70f 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Address.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Address.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.company.persistence.entity.type; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Manager.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Manager.java index 9d12f9e2a..3d84af8d1 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Manager.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/persistence/entity/type/Manager.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.company.persistence.entity.type; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Embeddable; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java index edcce19fa..c32ef21c1 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/CompanyWebAdapter.java @@ -1,5 +1,7 @@ package team.retum.jobis.domain.company.presentation; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Positive; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.validation.annotation.Validated; @@ -38,9 +40,6 @@ import team.retum.jobis.domain.company.usecase.UpdateCompanyTypeUseCase; import team.retum.jobis.domain.company.usecase.UpdateMouUseCase; -import javax.validation.Valid; -import javax.validation.constraints.Positive; - @RequiredArgsConstructor @Validated @RequestMapping("/companies") diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/ExistsCompanyWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/ExistsCompanyWebRequest.java index bdc57b52b..be3bc1b2d 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/ExistsCompanyWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/ExistsCompanyWebRequest.java @@ -1,11 +1,10 @@ package team.retum.jobis.domain.company.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class ExistsCompanyWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/RegisterCompanyWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/RegisterCompanyWebRequest.java index 151284cd2..62f4458c2 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/RegisterCompanyWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/RegisterCompanyWebRequest.java @@ -1,17 +1,17 @@ package team.retum.jobis.domain.company.presentation.dto.request; import com.fasterxml.jackson.annotation.JsonFormat; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.company.dto.request.RegisterCompanyRequest; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; import java.time.LocalDate; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyDetailsWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyDetailsWebRequest.java index 591682ba7..dfda063d4 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyDetailsWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyDetailsWebRequest.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.company.presentation.dto.request; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.company.dto.request.UpdateCompanyDetailsRequest; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class UpdateCompanyDetailsWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyTypeWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyTypeWebRequest.java index f18f1e3f8..cd8cb988f 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyTypeWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateCompanyTypeWebRequest.java @@ -1,11 +1,11 @@ package team.retum.jobis.domain.company.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.company.dto.request.UpdateCompanyTypeRequest; import team.retum.jobis.domain.company.model.CompanyType; -import javax.validation.constraints.NotNull; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateMouWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateMouWebRequest.java index d03abb232..221cc9cc2 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateMouWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/company/presentation/dto/request/UpdateMouWebRequest.java @@ -1,10 +1,10 @@ package team.retum.jobis.domain.company.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.company.dto.request.UpdateMouRequest; -import javax.validation.constraints.NotNull; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/notification/persistence/entity/NotificationEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/notification/persistence/entity/NotificationEntity.java index 38f48b3e0..8e6e57271 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/notification/persistence/entity/NotificationEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/notification/persistence/entity/NotificationEntity.java @@ -1,5 +1,17 @@ package team.retum.jobis.domain.notification.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -9,19 +21,6 @@ import team.retum.jobis.domain.user.persistence.entity.UserEntity; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; - @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "tbl_notification") diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitAreaEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitAreaEntity.java index 358940304..7ac2bb574 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitAreaEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitAreaEntity.java @@ -1,22 +1,22 @@ package team.retum.jobis.domain.recruitment.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.code.persistence.entity.RecruitAreaCodeEntity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitmentEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitmentEntity.java index 5d84f47d7..da531bfba 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitmentEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/entity/RecruitmentEntity.java @@ -1,12 +1,25 @@ package team.retum.jobis.domain.recruitment.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; -import team.retum.jobis.domain.application.persistence.entity.ApplicationEntity; import team.retum.jobis.domain.company.persistence.entity.CompanyEntity; import team.retum.jobis.domain.recruitment.model.ProgressType; import team.retum.jobis.domain.recruitment.model.RecruitStatus; @@ -17,24 +30,8 @@ import team.retum.jobis.global.converter.StringListConverter; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.Column; -import javax.persistence.Convert; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; import java.time.LocalDate; import java.time.LocalTime; -import java.util.ArrayList; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/converter/HiringProgressConverter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/converter/HiringProgressConverter.java index 68f621bf1..0c05bfa74 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/converter/HiringProgressConverter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/repository/converter/HiringProgressConverter.java @@ -1,9 +1,9 @@ package team.retum.jobis.domain.recruitment.persistence.repository.converter; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Converter; import team.retum.jobis.domain.recruitment.model.ProgressType; -import javax.persistence.AttributeConverter; -import javax.persistence.Converter; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/PayInfo.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/PayInfo.java index 4be045c55..8e3162a2d 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/PayInfo.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/PayInfo.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.recruitment.persistence.type; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/RecruitDate.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/RecruitDate.java index ed91b44d3..8859a066e 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/RecruitDate.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/RecruitDate.java @@ -1,13 +1,13 @@ package team.retum.jobis.domain.recruitment.persistence.type; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.application.exception.InvalidDateException; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; import java.time.LocalDate; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/WorkingHour.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/WorkingHour.java index 8ef47750d..98a6316a6 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/WorkingHour.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/persistence/type/WorkingHour.java @@ -1,13 +1,13 @@ package team.retum.jobis.domain.recruitment.persistence.type; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; import java.time.LocalTime; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/RecruitmentWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/RecruitmentWebAdapter.java index 7dcab1a68..e1c9b5da9 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/RecruitmentWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/RecruitmentWebAdapter.java @@ -1,5 +1,7 @@ package team.retum.jobis.domain.recruitment.presentation; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Positive; import lombok.RequiredArgsConstructor; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.http.HttpStatus; @@ -38,8 +40,6 @@ import team.retum.jobis.domain.recruitment.usecase.UpdateRecruitmentUseCase; import team.retum.jobis.global.exception.BadRequestException; -import javax.validation.Valid; -import javax.validation.constraints.Positive; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ApplyRecruitmentWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ApplyRecruitmentWebRequest.java index 041a01ba1..d8140d2d0 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ApplyRecruitmentWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ApplyRecruitmentWebRequest.java @@ -1,14 +1,14 @@ package team.retum.jobis.domain.recruitment.presentation.dto.request; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.recruitment.dto.request.ApplyRecruitmentRequest; import team.retum.jobis.domain.recruitment.model.ProgressType; import team.retum.jobis.global.annotation.ValidListElements; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import java.time.LocalDate; import java.time.LocalTime; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ChangeRecruitmentStatusWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ChangeRecruitmentStatusWebRequest.java index 8ab1360aa..00acf0747 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ChangeRecruitmentStatusWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/ChangeRecruitmentStatusWebRequest.java @@ -1,11 +1,11 @@ package team.retum.jobis.domain.recruitment.presentation.dto.request; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.recruitment.dto.request.ChangeRecruitmentStatusRequest; import team.retum.jobis.domain.recruitment.model.RecruitStatus; -import javax.validation.constraints.NotNull; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/RecruitAreaWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/RecruitAreaWebRequest.java index ac5f732a8..9449a6f3e 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/RecruitAreaWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/RecruitAreaWebRequest.java @@ -1,12 +1,12 @@ package team.retum.jobis.domain.recruitment.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.recruitment.dto.request.CreateRecruitAreaRequest; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/UpdateRecruitmentWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/UpdateRecruitmentWebRequest.java index 56429db95..5f171698b 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/UpdateRecruitmentWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/recruitment/presentation/dto/request/UpdateRecruitmentWebRequest.java @@ -1,12 +1,12 @@ package team.retum.jobis.domain.recruitment.presentation.dto.request; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.recruitment.dto.request.UpdateRecruitmentRequest; import team.retum.jobis.domain.recruitment.model.ProgressType; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import java.time.LocalDate; import java.time.LocalTime; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/QnAEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/QnAEntity.java index cfa0e3aba..97b6490cd 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/QnAEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/QnAEntity.java @@ -1,5 +1,15 @@ package team.retum.jobis.domain.review.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotBlank; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; @@ -7,17 +17,6 @@ import lombok.NoArgsConstructor; import team.retum.jobis.domain.code.persistence.entity.CodeEntity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotBlank; - @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @AllArgsConstructor diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/ReviewEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/ReviewEntity.java index e3c566834..de5d73670 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/ReviewEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/persistence/entity/ReviewEntity.java @@ -1,5 +1,14 @@ package team.retum.jobis.domain.review.persistence.entity; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -8,15 +17,6 @@ import team.retum.jobis.domain.student.persistence.entity.StudentEntity; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; import java.util.ArrayList; import java.util.List; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/ReviewWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/ReviewWebAdapter.java index 23c96a6a6..668f89fd5 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/ReviewWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/ReviewWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.review.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.DeleteMapping; @@ -18,8 +19,6 @@ import team.retum.jobis.domain.review.usecase.QueryReviewDetailUseCase; import team.retum.jobis.domain.review.usecase.QueryReviewsUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/reviews") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/dto/CreateReviewWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/dto/CreateReviewWebRequest.java index 40026ab68..94ee81ef1 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/dto/CreateReviewWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/review/presentation/dto/CreateReviewWebRequest.java @@ -1,15 +1,15 @@ package team.retum.jobis.domain.review.presentation.dto; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Builder; import lombok.Getter; import team.retum.jobis.domain.review.dto.CreateReviewRequest; import team.retum.jobis.domain.review.dto.CreateReviewRequest.QnAElement; import team.retum.jobis.global.annotation.ValidListElements; -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import java.util.List; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/PortfolioEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/PortfolioEntity.java index 2b426a476..552209ede 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/PortfolioEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/PortfolioEntity.java @@ -1,20 +1,19 @@ package team.retum.jobis.domain.student.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; - @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "tbl_portfolio") diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/StudentEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/StudentEntity.java index d7d87c106..cb1ae7203 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/StudentEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/StudentEntity.java @@ -1,5 +1,18 @@ package team.retum.jobis.domain.student.persistence.entity; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.MapsId; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -11,20 +24,6 @@ import team.retum.jobis.domain.user.persistence.entity.UserEntity; import team.retum.jobis.global.util.ImageProperty; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.MapsId; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.validation.constraints.NotNull; - @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @DynamicInsert diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/VerifiedStudentEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/VerifiedStudentEntity.java index 266b2fa77..3ae535ae7 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/VerifiedStudentEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/persistence/entity/VerifiedStudentEntity.java @@ -1,16 +1,15 @@ package team.retum.jobis.domain.student.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/StudentWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/StudentWebAdapter.java index 28cd6bcc0..249fb7069 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/StudentWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/StudentWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.student.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; @@ -24,8 +25,6 @@ import team.retum.jobis.domain.student.usecase.UpdateStudentProfileUseCase; import team.retum.jobis.domain.student.usecase.VerifyStudentUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/students") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/StudentSignUpWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/StudentSignUpWebRequest.java index 78c9d4e4d..ebd041795 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/StudentSignUpWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/StudentSignUpWebRequest.java @@ -1,16 +1,15 @@ package team.retum.jobis.domain.student.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.student.dto.StudentSignUpRequest; import team.retum.jobis.domain.student.model.Gender; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class StudentSignUpWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateForgottenPasswordWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateForgottenPasswordWebRequest.java index 982e3f179..8838aa6ae 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateForgottenPasswordWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateForgottenPasswordWebRequest.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.student.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.student.dto.UpdateForgottenPasswordRequest; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class UpdateForgottenPasswordWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdatePasswordWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdatePasswordWebRequest.java index 57a7bc789..90368d6b5 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdatePasswordWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdatePasswordWebRequest.java @@ -1,12 +1,11 @@ package team.retum.jobis.domain.student.presentation.dto.request; +import jakarta.validation.constraints.Pattern; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.student.dto.UpdatePasswordRequest; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.Pattern; - @Getter @NoArgsConstructor public class UpdatePasswordWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateStudentProfileWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateStudentProfileWebRequest.java index 6596d06e8..710fd379f 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateStudentProfileWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/student/presentation/dto/request/UpdateStudentProfileWebRequest.java @@ -1,12 +1,11 @@ package team.retum.jobis.domain.student.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.student.dto.UpdateStudentProfileRequest; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class UpdateStudentProfileWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/teacher/persistence/entity/TeacherEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/teacher/persistence/entity/TeacherEntity.java index e19dba5b5..acec159fc 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/teacher/persistence/entity/TeacherEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/teacher/persistence/entity/TeacherEntity.java @@ -1,21 +1,20 @@ package team.retum.jobis.domain.teacher.persistence.entity; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.MapsId; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.user.persistence.entity.UserEntity; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.MapsId; -import javax.persistence.OneToOne; -import javax.persistence.Table; - @Getter @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/persistence/entity/UserEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/persistence/entity/UserEntity.java index 34505a205..ef503a4ca 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/persistence/entity/UserEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/persistence/entity/UserEntity.java @@ -1,5 +1,14 @@ package team.retum.jobis.domain.user.persistence.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -7,16 +16,6 @@ import team.retum.jobis.domain.auth.model.Authority; import team.retum.jobis.global.entity.BaseTimeEntity; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; - @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "tbl_user") diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/UserWebAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/UserWebAdapter.java index e47a65355..2ebd4e62b 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/UserWebAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/UserWebAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.domain.user.presentation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -9,8 +10,6 @@ import team.retum.jobis.domain.user.presentation.dto.request.LoginWebRequest; import team.retum.jobis.domain.user.usecase.LoginUseCase; -import javax.validation.Valid; - @RequiredArgsConstructor @RequestMapping("/users") @RestController diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/dto/request/LoginWebRequest.java b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/dto/request/LoginWebRequest.java index cc2851f41..936b359da 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/dto/request/LoginWebRequest.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/domain/user/presentation/dto/request/LoginWebRequest.java @@ -1,14 +1,13 @@ package team.retum.jobis.domain.user.presentation.dto.request; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.NoArgsConstructor; import team.retum.jobis.domain.user.dto.LoginRequest; import team.retum.jobis.global.util.RegexProperty; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - @Getter @NoArgsConstructor public class LoginWebRequest { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/exception/model/ExceptionEvent.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/exception/model/ExceptionEvent.java index 6ca0c4d52..e459e9ff5 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/exception/model/ExceptionEvent.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/exception/model/ExceptionEvent.java @@ -1,10 +1,9 @@ package team.retum.jobis.event.exception.model; +import jakarta.servlet.http.HttpServletRequest; import lombok.Builder; import lombok.Getter; -import javax.servlet.http.HttpServletRequest; - @Getter @Builder public class ExceptionEvent { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/PublishNotificationEventAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/PublishNotificationEventAdapter.java index 720fa6fc8..57a96ec42 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/PublishNotificationEventAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/PublishNotificationEventAdapter.java @@ -19,20 +19,14 @@ public class PublishNotificationEventAdapter implements PublishNotificationEvent @Override public void publishSingleNotificationEvent(Notification notification, String token) { eventPublisher.publishEvent( - SingleNotificationEvent.builder() - .notification(notification) - .token(token) - .build() + new SingleNotificationEvent(notification, token) ); } @Override public void publishGroupNotificationEvent(Notification notification, List tokens) { eventPublisher.publishEvent( - GroupNotificationEvent.builder() - .notification(notification) - .tokens(tokens) - .build() + new GroupNotificationEvent(notification, tokens) ); } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/GroupNotificationEvent.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/GroupNotificationEvent.java index 8c5c65dd8..408604082 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/GroupNotificationEvent.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/GroupNotificationEvent.java @@ -1,12 +1,16 @@ package team.retum.jobis.event.notification.model; import lombok.Getter; -import lombok.experimental.SuperBuilder; +import team.retum.jobis.domain.notification.model.Notification; import java.util.List; @Getter -@SuperBuilder public class GroupNotificationEvent extends NotificationEvent { private final List tokens; + + public GroupNotificationEvent(Notification notification, List tokens) { + super(notification); + this.tokens = tokens; + } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/NotificationEvent.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/NotificationEvent.java index 877705cf4..fd55f4e7a 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/NotificationEvent.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/NotificationEvent.java @@ -1,11 +1,13 @@ package team.retum.jobis.event.notification.model; import lombok.Getter; -import lombok.experimental.SuperBuilder; import team.retum.jobis.domain.notification.model.Notification; @Getter -@SuperBuilder public class NotificationEvent { private final Notification notification; + + public NotificationEvent(Notification notification) { + this.notification = notification; + } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/SingleNotificationEvent.java b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/SingleNotificationEvent.java index 51ac01ffa..b5aaf9cb4 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/SingleNotificationEvent.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/event/notification/model/SingleNotificationEvent.java @@ -1,10 +1,14 @@ package team.retum.jobis.event.notification.model; import lombok.Getter; -import lombok.experimental.SuperBuilder; +import team.retum.jobis.domain.notification.model.Notification; @Getter -@SuperBuilder public class SingleNotificationEvent extends NotificationEvent { private final String token; + + public SingleNotificationEvent(Notification notification, String token) { + super(notification); + this.token = token; + } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/annotation/ValidListElements.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/annotation/ValidListElements.java index 33691ff3b..3bf5a0be9 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/annotation/ValidListElements.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/annotation/ValidListElements.java @@ -1,9 +1,10 @@ package team.retum.jobis.global.annotation; -import javax.validation.Constraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; -import javax.validation.Payload; +import jakarta.validation.Constraint; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; +import jakarta.validation.Payload; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/MysqlDialectConfig.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/MysqlDialectConfig.java index 668745200..0e8bf2f6f 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/MysqlDialectConfig.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/MysqlDialectConfig.java @@ -1,16 +1,26 @@ package team.retum.jobis.global.config; -import org.hibernate.dialect.MySQL8Dialect; -import org.hibernate.dialect.function.SQLFunctionTemplate; +import org.hibernate.boot.model.FunctionContributions; +import org.hibernate.dialect.DatabaseVersion; +import org.hibernate.dialect.MySQLDialect; import org.hibernate.type.StandardBasicTypes; import org.springframework.stereotype.Component; @Component -public class MysqlDialectConfig extends MySQL8Dialect { +public class MysqlDialectConfig extends MySQLDialect { + public MysqlDialectConfig() { - super.registerFunction( + super(DatabaseVersion.make(8)); + } + + @Override + public void initializeFunctionRegistry(FunctionContributions functionContributions) { + super.initializeFunctionRegistry(functionContributions); + + functionContributions.getFunctionRegistry().registerPattern( "GROUP_CONCAT", - new SQLFunctionTemplate(StandardBasicTypes.STRING, "group_concat(distinct ?1)") + "group_concat(distinct ?1)", + functionContributions.getTypeConfiguration().getBasicTypeRegistry().resolve(StandardBasicTypes.STRING) ); } } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/QuerydslConfig.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/QuerydslConfig.java index 37ed4365e..56c8b481a 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/QuerydslConfig.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/config/QuerydslConfig.java @@ -1,12 +1,11 @@ package team.retum.jobis.global.config; import com.querydsl.jpa.impl.JPAQueryFactory; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - @Configuration public class QuerydslConfig { @PersistenceContext diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/converter/StringListConverter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/converter/StringListConverter.java index a2dcda44e..9d9e9e711 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/converter/StringListConverter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/converter/StringListConverter.java @@ -1,8 +1,8 @@ package team.retum.jobis.global.converter; +import jakarta.persistence.AttributeConverter; import team.retum.jobis.common.util.StringUtil; -import javax.persistence.AttributeConverter; import java.util.List; public class StringListConverter implements AttributeConverter, String> { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/entity/BaseTimeEntity.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/entity/BaseTimeEntity.java index ad239e6ee..641b409b3 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/entity/BaseTimeEntity.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/entity/BaseTimeEntity.java @@ -1,10 +1,10 @@ package team.retum.jobis.global.entity; +import jakarta.persistence.Column; +import jakarta.persistence.MappedSuperclass; import lombok.Getter; import org.springframework.data.annotation.CreatedDate; -import javax.persistence.Column; -import javax.persistence.MappedSuperclass; import java.time.LocalDateTime; @Getter diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionFilter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionFilter.java index ce52d7722..18c594ef4 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionFilter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionFilter.java @@ -1,6 +1,9 @@ package team.retum.jobis.global.error; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.servlet.FilterChain; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.context.ApplicationEventPublisher; @@ -13,9 +16,6 @@ import team.retum.jobis.global.security.auth.CurrentUserHolder; import team.retum.jobis.global.util.LogUtil; -import javax.servlet.FilterChain; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; @Slf4j diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionHandler.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionHandler.java index d32ea2d80..1104f8c19 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionHandler.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/GlobalExceptionHandler.java @@ -1,5 +1,6 @@ package team.retum.jobis.global.error; +import jakarta.validation.ConstraintViolationException; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.validation.BindException; @@ -9,8 +10,6 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; import team.retum.jobis.global.error.response.ValidationErrorResponse; -import javax.validation.ConstraintViolationException; - @Slf4j @RestControllerAdvice public class GlobalExceptionHandler { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/response/ValidationErrorResponse.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/response/ValidationErrorResponse.java index 38b4ae8dc..8d04ef6b5 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/response/ValidationErrorResponse.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/error/response/ValidationErrorResponse.java @@ -1,13 +1,13 @@ package team.retum.jobis.global.error.response; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; import lombok.Builder; import lombok.Getter; import org.springframework.http.HttpStatus; import org.springframework.validation.BindException; import org.springframework.validation.FieldError; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; import java.util.HashMap; import java.util.Map; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/FilterConfig.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/FilterConfig.java index 2ec7b5198..aad4d7def 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/FilterConfig.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/FilterConfig.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; import org.springframework.context.ApplicationEventPublisher; -import org.springframework.security.config.annotation.SecurityConfigurerAdapter; +import org.springframework.security.config.annotation.SecurityConfigurer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.web.DefaultSecurityFilterChain; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; @@ -14,14 +14,18 @@ @Component @RequiredArgsConstructor -public class FilterConfig extends SecurityConfigurerAdapter { +public class FilterConfig implements SecurityConfigurer { private final JwtParser jwtParser; private final ObjectMapper objectMapper; private final ApplicationEventPublisher eventPublisher; @Override - public void configure(HttpSecurity http) { + public void init(HttpSecurity http) throws Exception { + } + + @Override + public void configure(HttpSecurity http) throws Exception { http.addFilterBefore(new JwtFilter(jwtParser), UsernamePasswordAuthenticationFilter.class); http.addFilterBefore(new GlobalExceptionFilter(objectMapper, eventPublisher), JwtFilter.class); } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java index 9017028d1..fce403c40 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/SecurityConfig.java @@ -6,8 +6,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; +import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.CsrfConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; @@ -30,117 +32,115 @@ public class SecurityConfig { @Bean protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { - http. - csrf().disable() - .cors().and() - - .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) - - .and() - - .authorizeRequests() - - // actuator - .antMatchers(HttpMethod.GET, "/actuator/**").permitAll() - - // bugs - .antMatchers(HttpMethod.GET, "/bugs").hasAuthority(DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/bugs/{bug-report-id}").hasAuthority(DEVELOPER.name()) - .antMatchers(HttpMethod.POST, "/bugs").hasAuthority(STUDENT.name()) - - // students - .antMatchers(HttpMethod.GET, "/students/my").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.POST, "/students").permitAll() - .antMatchers(HttpMethod.PATCH, "/students//forgotten_password").permitAll() - .antMatchers(HttpMethod.GET, "/students/exists").permitAll() - .antMatchers(HttpMethod.PATCH, "/students/profile").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/students/password").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.PATCH, "/students/password").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - - // applications - .antMatchers(HttpMethod.GET, "/applications").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/applications/count").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/applications/employment/count").permitAll() - .antMatchers(HttpMethod.GET, "/applications/pass/{company-id}").hasAnyAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/applications/company").hasAuthority(COMPANY.name()) - .antMatchers(HttpMethod.GET, "/applications/students").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.POST, "/applications/{company-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.DELETE, "/applications/{application-id}").hasAuthority(STUDENT.name()) - .antMatchers(HttpMethod.PATCH, "/applications/status").hasAnyAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/applications/train-date").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/applications/rejection/{application-id}").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PUT, "/applications/{application-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/applications/rejection/{application-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - - // recruitments - .antMatchers(HttpMethod.GET, "/recruitments/my").hasAuthority(COMPANY.name()) - .antMatchers(HttpMethod.POST, "/recruitments").hasAuthority(COMPANY.name()) - .antMatchers(HttpMethod.PATCH, "/recruitments/{recruitment-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/recruitments/area/{recruit-area-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - .antMatchers(HttpMethod.POST, "/recruitments/{recruitment-id}/area").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - .antMatchers(HttpMethod.GET, "/recruitments/student").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/recruitments/student/count").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/recruitments/{recruitment-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) - .antMatchers(HttpMethod.GET, "/recruitments/teacher").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/recruitments/teacher/count").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/recruitments/status").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.DELETE, "/recruitments/{recruitment-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - .antMatchers(HttpMethod.DELETE, "/recruitments/area/{recruit-area-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - - // bookmarks - .antMatchers(HttpMethod.POST, "/bookmarks/{recruitment-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.DELETE, "/bookmarks/{recruitment-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/bookmarks").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - - // auth - .antMatchers(HttpMethod.POST, "/auth/code").permitAll() - .antMatchers(HttpMethod.PATCH, "/auth/code").permitAll() - .antMatchers(HttpMethod.PUT, "/auth/reissue").permitAll() - - // companies - .antMatchers(HttpMethod.GET, "/companies/teacher").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/companies/teacher/count").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/companies/type").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/companies/mou").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.POST, "/companies").permitAll() - .antMatchers(HttpMethod.GET, "/companies/my").hasAuthority(COMPANY.name()) - .antMatchers(HttpMethod.PATCH, "/companies/{company-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) - .antMatchers(HttpMethod.GET, "/companies/exists/{business-number}").permitAll() - .antMatchers(HttpMethod.POST, "/companies/recruitment").hasAuthority(COMPANY.name()) - .antMatchers(HttpMethod.GET, "/companies/{company-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/companies/student").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/companies/student/count").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.GET, "/companies/employment").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/companies/employment/count").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.GET, "/companies/review").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - - // users - .antMatchers(HttpMethod.POST, "/users/login").permitAll() - - // files - .antMatchers(HttpMethod.POST, "/files").permitAll() - .antMatchers(HttpMethod.DELETE, "/files").permitAll() - - // code - .antMatchers(HttpMethod.GET, "/codes").permitAll() - - // acceptance - .antMatchers(HttpMethod.GET, "/acceptances/{company-id}").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/acceptances/field-train/{application-id}").hasAnyAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/acceptances/contract-date").hasAuthority(TEACHER.name()) - .antMatchers(HttpMethod.POST, "/acceptances/employment").hasAnyAuthority(TEACHER.name()) - .antMatchers(HttpMethod.PATCH, "/acceptances/field-train").hasAnyAuthority(TEACHER.name()) - .antMatchers(HttpMethod.DELETE, "/acceptances").hasAnyAuthority(TEACHER.name()) - - // review - .antMatchers(HttpMethod.GET, "/reviews/{company-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) - .antMatchers(HttpMethod.GET, "/reviews/details/{review-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) - .antMatchers(HttpMethod.POST, "/reviews").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) - .antMatchers(HttpMethod.DELETE, "/reviews/{review-id}").hasAuthority(TEACHER.name()) - - .anyRequest().authenticated() - .and() + http + .csrf(CsrfConfigurer::disable) + .cors(Customizer.withDefaults()) + .sessionManagement(configurer -> configurer.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .authorizeHttpRequests(authorize -> + authorize + // actuator + .requestMatchers(HttpMethod.GET, "/actuator/**").permitAll() + + // bugs + .requestMatchers(HttpMethod.GET, "/bugs").hasAuthority(DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/bugs/{bug-report-id}").hasAuthority(DEVELOPER.name()) + .requestMatchers(HttpMethod.POST, "/bugs").hasAuthority(STUDENT.name()) + + // students + .requestMatchers(HttpMethod.GET, "/students/my").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.POST, "/students").permitAll() + .requestMatchers(HttpMethod.PATCH, "/students//forgotten_password").permitAll() + .requestMatchers(HttpMethod.GET, "/students/exists").permitAll() + .requestMatchers(HttpMethod.PATCH, "/students/profile").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/students/password").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.PATCH, "/students/password").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + + // applications + .requestMatchers(HttpMethod.GET, "/applications").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/applications/count").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/applications/employment/count").permitAll() + .requestMatchers(HttpMethod.GET, "/applications/pass/{company-id}").hasAnyAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/applications/company").hasAuthority(COMPANY.name()) + .requestMatchers(HttpMethod.GET, "/applications/students").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.POST, "/applications/{company-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.DELETE, "/applications/{application-id}").hasAuthority(STUDENT.name()) + .requestMatchers(HttpMethod.PATCH, "/applications/status").hasAnyAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/applications/train-date").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/applications/rejection/{application-id}").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PUT, "/applications/{application-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/applications/rejection/{application-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + + // recruitments + .requestMatchers(HttpMethod.GET, "/recruitments/my").hasAuthority(COMPANY.name()) + .requestMatchers(HttpMethod.POST, "/recruitments").hasAuthority(COMPANY.name()) + .requestMatchers(HttpMethod.PATCH, "/recruitments/{recruitment-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/recruitments/area/{recruit-area-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) + .requestMatchers(HttpMethod.POST, "/recruitments/{recruitment-id}/area").hasAnyAuthority(COMPANY.name(), TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/recruitments/student").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/recruitments/student/count").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/recruitments/{recruitment-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/recruitments/teacher").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/recruitments/teacher/count").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/recruitments/status").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.DELETE, "/recruitments/{recruitment-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) + .requestMatchers(HttpMethod.DELETE, "/recruitments/area/{recruit-area-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) + + // bookmarks + .requestMatchers(HttpMethod.POST, "/bookmarks/{recruitment-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.DELETE, "/bookmarks/{recruitment-id}").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/bookmarks").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + + // auth + .requestMatchers(HttpMethod.POST, "/auth/code").permitAll() + .requestMatchers(HttpMethod.PATCH, "/auth/code").permitAll() + .requestMatchers(HttpMethod.PUT, "/auth/reissue").permitAll() + + // companies + .requestMatchers(HttpMethod.GET, "/companies/teacher").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/companies/teacher/count").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/companies/type").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/companies/mou").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.POST, "/companies").permitAll() + .requestMatchers(HttpMethod.GET, "/companies/my").hasAuthority(COMPANY.name()) + .requestMatchers(HttpMethod.PATCH, "/companies/{company-id}").hasAnyAuthority(COMPANY.name(), TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/companies/exists/{business-number}").permitAll() + .requestMatchers(HttpMethod.POST, "/companies/recruitment").hasAuthority(COMPANY.name()) + .requestMatchers(HttpMethod.GET, "/companies/{company-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/companies/student").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/companies/student/count").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.GET, "/companies/employment").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/companies/employment/count").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/companies/review").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + + // users + .requestMatchers(HttpMethod.POST, "/users/login").permitAll() + + // files + .requestMatchers(HttpMethod.POST, "/files").permitAll() + .requestMatchers(HttpMethod.DELETE, "/files").permitAll() + + // code + .requestMatchers(HttpMethod.GET, "/codes").permitAll() + + // acceptance + .requestMatchers(HttpMethod.GET, "/acceptances/{company-id}").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/acceptances/field-train/{application-id}").hasAnyAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/acceptances/contract-date").hasAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.POST, "/acceptances/employment").hasAnyAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.PATCH, "/acceptances/field-train").hasAnyAuthority(TEACHER.name()) + .requestMatchers(HttpMethod.DELETE, "/acceptances").hasAnyAuthority(TEACHER.name()) + + // review + .requestMatchers(HttpMethod.GET, "/reviews/{company-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) + .requestMatchers(HttpMethod.GET, "/reviews/details/{review-id}").hasAnyAuthority(STUDENT.name(), TEACHER.name()) + .requestMatchers(HttpMethod.POST, "/reviews").hasAnyAuthority(STUDENT.name(), DEVELOPER.name()) + .requestMatchers(HttpMethod.DELETE, "/reviews/{review-id}").hasAuthority(TEACHER.name()) + + .anyRequest().authenticated() + + ) .apply(new FilterConfig(jwtParser, objectMapper, eventPublisher)); + return http.build(); } diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtFilter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtFilter.java index ffd36ab25..abe7ee381 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtFilter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtFilter.java @@ -1,14 +1,14 @@ package team.retum.jobis.global.security.jwt; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.filter.OncePerRequestFilter; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtParser.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtParser.java index 0ff6f105e..00e6c7084 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtParser.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtParser.java @@ -3,6 +3,7 @@ import io.jsonwebtoken.Claims; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.Jwts; +import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; @@ -15,8 +16,6 @@ import team.retum.jobis.global.security.auth.student.StudentDetailsService; import team.retum.jobis.global.security.auth.teacher.TeacherDetailsService; -import javax.servlet.http.HttpServletRequest; - @Component @RequiredArgsConstructor public class JwtParser { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtProperties.java b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtProperties.java index 8938801f2..56fa0671f 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtProperties.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/global/security/jwt/JwtProperties.java @@ -2,12 +2,10 @@ import lombok.Getter; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.ConstructorBinding; import java.util.Base64; @Getter -@ConstructorBinding @ConfigurationProperties(prefix = "jwt") public class JwtProperties { private final String secret; diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/api/client/FeignProperty.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/api/client/FeignProperty.java index b96bafee6..aa6713974 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/api/client/FeignProperty.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/api/client/FeignProperty.java @@ -3,12 +3,10 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.ConstructorBinding; @Getter @RequiredArgsConstructor -@ConstructorBinding @ConfigurationProperties(prefix = "openfeign") public class FeignProperty { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Config.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Config.java new file mode 100644 index 000000000..d6ae8bf8a --- /dev/null +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Config.java @@ -0,0 +1,32 @@ +package team.retum.jobis.thirdparty.s3; + +import com.amazonaws.auth.AWSCredentials; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.services.s3.AmazonS3; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class S3Config { + + @Value("${cloud.aws.credentials.access-key}") + private String accessKey; + + @Value("${cloud.aws.credentials.secret-key}") + private String secretKey; + + @Value("${cloud.aws.region.static}") + private String region; + + @Bean + public AmazonS3 amazonS3() { + AWSCredentials awsCredentials = new BasicAWSCredentials(accessKey, secretKey); + return AmazonS3ClientBuilder.standard() + .withRegion(region) + .withCredentials(new AWSStaticCredentialsProvider(awsCredentials)) + .build(); + } +} diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Properties.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Properties.java index 96944c8e8..835525482 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Properties.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/s3/S3Properties.java @@ -3,10 +3,8 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.ConstructorBinding; @Getter -@ConstructorBinding @RequiredArgsConstructor @ConfigurationProperties("cloud.aws.s3") public class S3Properties { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/ses/AwsSesProperties.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/ses/AwsSesProperties.java index 23fed127a..05b7fafe2 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/ses/AwsSesProperties.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/ses/AwsSesProperties.java @@ -3,10 +3,8 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.ConstructorBinding; @Getter -@ConstructorBinding @RequiredArgsConstructor @ConfigurationProperties("cloud.aws.ses") public class AwsSesProperties { diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/WebhookUtil.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/WebhookUtil.java index b5951974c..d434c6c69 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/WebhookUtil.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/WebhookUtil.java @@ -1,9 +1,8 @@ package team.retum.jobis.thirdparty.webhook; +import jakarta.servlet.http.HttpServletRequest; import team.retum.jobis.domain.bug.model.BugReport; -import javax.servlet.http.HttpServletRequest; - public interface WebhookUtil { void sendBugReport(BugReport bugReport, String writer); diff --git a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/slack/SlackAdapter.java b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/slack/SlackAdapter.java index f602307cd..c6971bfce 100644 --- a/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/slack/SlackAdapter.java +++ b/jobis-infrastructure/src/main/java/team/retum/jobis/thirdparty/webhook/slack/SlackAdapter.java @@ -1,5 +1,6 @@ package team.retum.jobis.thirdparty.webhook.slack; +import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import net.gpedro.integrations.slack.SlackApi; @@ -14,7 +15,6 @@ import team.retum.jobis.thirdparty.s3.S3Properties; import team.retum.jobis.thirdparty.webhook.WebhookUtil; -import javax.servlet.http.HttpServletRequest; import java.util.Collections; import java.util.Date; import java.util.List; diff --git a/jobis-infrastructure/src/main/resources/application.yml b/jobis-infrastructure/src/main/resources/application.yml index c4bfe2bf5..c74b79924 100644 --- a/jobis-infrastructure/src/main/resources/application.yml +++ b/jobis-infrastructure/src/main/resources/application.yml @@ -1,7 +1,7 @@ spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://${DB_URL:localhost}:3306/${DB_NAME:jobis}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&tinyInt1isBit=false&rewriteBatchedStatements=true + url: jdbc:mysql://${DB_URL:43.200.196.142}:3306/${DB_NAME:jobis}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&tinyInt1isBit=false&rewriteBatchedStatements=true username: ${DB_USERNAME:root} password: ${DB_PASSWORD:11111111}