diff --git a/build.gradle b/build.gradle index 804733b..84cb217 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,6 @@ dependencies { runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6' runtimeOnly 'com.h2database:h2' implementation 'jakarta.validation:jakarta.validation-api:3.0.2' - implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13.2' implementation group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.13' diff --git a/src/main/generated/team18/team18_be/recruitment/mapper/RecruitmentMapperImpl.java b/src/main/generated/team18/team18_be/recruitment/mapper/RecruitmentMapperImpl.java index 93bc3f8..85dda10 100644 --- a/src/main/generated/team18/team18_be/recruitment/mapper/RecruitmentMapperImpl.java +++ b/src/main/generated/team18/team18_be/recruitment/mapper/RecruitmentMapperImpl.java @@ -11,7 +11,7 @@ @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2024-11-08T17:16:00+0900", + date = "2024-11-10T20:46:08+0900", comments = "version: 1.5.3.Final, compiler: javac, environment: Java 21.0.3 (Eclipse Adoptium)" ) @Component diff --git a/src/main/generated/team18/team18_be/resume/mapper/ResumeMapperImpl.java b/src/main/generated/team18/team18_be/resume/mapper/ResumeMapperImpl.java index 006af9e..b4977b5 100644 --- a/src/main/generated/team18/team18_be/resume/mapper/ResumeMapperImpl.java +++ b/src/main/generated/team18/team18_be/resume/mapper/ResumeMapperImpl.java @@ -10,7 +10,7 @@ @Generated( value = "org.mapstruct.ap.MappingProcessor", - date = "2024-11-08T17:16:00+0900", + date = "2024-11-10T20:46:08+0900", comments = "version: 1.5.3.Final, compiler: javac, environment: Java 21.0.3 (Eclipse Adoptium)" ) @Component diff --git a/src/main/java/team18/team18_be/apply/dto/response/MandatoryResponse.java b/src/main/java/team18/team18_be/apply/dto/response/MandatoryResponse.java index b1ae800..6b4e8dd 100644 --- a/src/main/java/team18/team18_be/apply/dto/response/MandatoryResponse.java +++ b/src/main/java/team18/team18_be/apply/dto/response/MandatoryResponse.java @@ -1,6 +1,6 @@ package team18.team18_be.apply.dto.response; public record MandatoryResponse(boolean resumeExistence, boolean visaExistence, - boolean foreignerIdNumberExistence,boolean signExistence) { + boolean foreignerIdNumberExistence, boolean signExistence) { } diff --git a/src/main/java/team18/team18_be/apply/service/ApplyService.java b/src/main/java/team18/team18_be/apply/service/ApplyService.java index a1e7a9a..fc06ffa 100644 --- a/src/main/java/team18/team18_be/apply/service/ApplyService.java +++ b/src/main/java/team18/team18_be/apply/service/ApplyService.java @@ -2,7 +2,6 @@ import java.util.List; import java.util.NoSuchElementException; -import java.util.Optional; import java.util.stream.Collectors; import org.springframework.stereotype.Service; import team18.team18_be.apply.ApplyStatusEnum.ApplyStatus; @@ -21,8 +20,6 @@ import team18.team18_be.resume.entity.Resume; import team18.team18_be.resume.repository.ResumeRepository; import team18.team18_be.userInformation.entity.Company; -import team18.team18_be.userInformation.entity.ForeignerInformation; -import team18.team18_be.userInformation.entity.Sign; import team18.team18_be.userInformation.repository.CompanyRepository; import team18.team18_be.userInformation.repository.ForeignerInformationRepository; import team18.team18_be.userInformation.repository.SignRepository; @@ -42,14 +39,15 @@ public class ApplyService { public ApplyService(ApplicationFormRepository applicationFormRepository, ApplyRepository applyRepository, RecruitmentRepository recruitmentRepository, ResumeRepository resumeRepository, CompanyRepository companyRepository, - ForeignerInformationRepository foreignerInformationRepository,SignRepository signRepository) { + ForeignerInformationRepository foreignerInformationRepository, + SignRepository signRepository) { this.applicationFormRepository = applicationFormRepository; this.applyRepository = applyRepository; this.recruitmentRepository = recruitmentRepository; this.resumeRepository = resumeRepository; this.companyRepository = companyRepository; this.foreignerInformationRepository = foreignerInformationRepository; - this.signRepository=signRepository; + this.signRepository = signRepository; } public Long createApplicationForm(ApplicationFormRequest applicationFormRequest, @@ -127,7 +125,7 @@ public MandatoryResponse checkMandatory(User user) { boolean signExistence = signRepository.findByUser(user).isPresent(); MandatoryResponse mandatoryResponse = new MandatoryResponse(resumeExistence, visaExistence, - foreignerIdNumberExistence,signExistence); + foreignerIdNumberExistence, signExistence); return mandatoryResponse; } diff --git a/src/main/java/team18/team18_be/config/swagger/SwaggerConfig.java b/src/main/java/team18/team18_be/config/swagger/SwaggerConfig.java index e699c4e..8eedd9f 100644 --- a/src/main/java/team18/team18_be/config/swagger/SwaggerConfig.java +++ b/src/main/java/team18/team18_be/config/swagger/SwaggerConfig.java @@ -4,15 +4,10 @@ import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.media.StringSchema; -import io.swagger.v3.oas.models.parameters.HeaderParameter; import io.swagger.v3.oas.models.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.security.SecurityScheme.In; import io.swagger.v3.oas.models.security.SecurityScheme.Type; -import java.util.Set; -import org.springdoc.core.customizers.OpenApiCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -38,38 +33,4 @@ public OpenAPI api() { .components(new Components().addSecuritySchemes("Bearer Token", apiKey)) .addSecurityItem(securityRequirement); } - - @Bean - public OpenApiCustomizer customAuthParameter() { - Set targetPaths = Set.of( - "/api/register" - ); - - return openApi -> openApi - .getPaths() - .forEach((path, pathItem) -> { - boolean isTargetPath = false; - for (String targetPath : targetPaths) { - if (path.startsWith(targetPath)) { - isTargetPath = true; - break; - } - } - - if (isTargetPath) { - pathItem.readOperations().forEach( - this::addAuthParam - ); - } - }); - } - - private void addAuthParam(Operation operation) { - operation.addParametersItem(new HeaderParameter() - .name("Authorization") - .description("액세스 토큰") - .required(true) - .schema(new StringSchema())); - } - } diff --git a/src/main/java/team18/team18_be/recruitment/controller/RecruitmentController.java b/src/main/java/team18/team18_be/recruitment/controller/RecruitmentController.java index 3f11bde..a07b81f 100644 --- a/src/main/java/team18/team18_be/recruitment/controller/RecruitmentController.java +++ b/src/main/java/team18/team18_be/recruitment/controller/RecruitmentController.java @@ -1,8 +1,8 @@ package team18.team18_be.recruitment.controller; import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import java.util.List; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; @@ -23,7 +23,7 @@ import team18.team18_be.recruitment.dto.response.RecruitmentSummationResponse; import team18.team18_be.recruitment.service.RecruitmentService; -@Api(tags = {"구인글 관련 Controller"}) +@Tag(name = "구인글 관련 Controller") @RestController @RequestMapping("/api/recruitments") public class RecruitmentController { @@ -34,7 +34,7 @@ public RecruitmentController(RecruitmentService recruitmentService) { this.recruitmentService = recruitmentService; } - @ApiOperation(value = "구인글 저장 메서드") + @Operation(summary = "구인글 저장 메서드") @PostMapping public ResponseEntity saveRecruitment( @RequestBody RecruitmentRequest recruitmentRequest, @@ -44,7 +44,7 @@ public ResponseEntity saveRecruitment( return ResponseEntity.status(HttpStatus.CREATED).build(); } - @ApiOperation(value = "구인글 전체 조회 메서드") + @Operation(summary = "구인글 전체 조회 메서드") @GetMapping public ResponseEntity> getAllRecruitments( @RequestParam int page @@ -54,7 +54,7 @@ public ResponseEntity> getAllRecruitments( return ResponseEntity.ok().body(recruitmentService.getAllRecruitment(pageable)); } - @ApiOperation(value = "구인글id로 조회 메서드") + @Operation(summary = "구인글id로 조회 메서드") @GetMapping("/{postId}") public ResponseEntity getRecruitments( @PathVariable Long postId @@ -63,7 +63,7 @@ public ResponseEntity getRecruitments( .body(recruitmentService.getRecruitmentResponseByRecruitmentId(postId)); } - @ApiOperation(value = "회사 별 구인글 조회 메서드") + @Operation(summary = "회사 별 구인글 조회 메서드") @GetMapping("/company/{companyId}") public ResponseEntity> getAllRecruitmentByCompanyId( @PathVariable Long companyId @@ -72,7 +72,7 @@ public ResponseEntity> getAllRecruitmentByCo .body(recruitmentService.getRecruitmentResponseByCompanyId(companyId)); } - @ApiOperation(value = "구인글 마감 메서드") + @Operation(summary = "구인글 마감 메서드") @GetMapping("/hiringClose/{recruitmentId}") public ResponseEntity setRecruitmentHiringFalse( @PathVariable Long recruitmentId @@ -81,7 +81,7 @@ public ResponseEntity setRecruitmentHiringFalse( return ResponseEntity.ok().build(); } - @ApiOperation(value = "최근 올라온 구인글 순서대로 정렬") + @Operation(summary = "최근 올라온 구인글 순서대로 정렬") @GetMapping("/latestRegistration") public ResponseEntity> getAllRecruitmentsLatestRegistration( @RequestParam int page @@ -91,7 +91,7 @@ public ResponseEntity> getAllRecruitmentsLate return ResponseEntity.ok().body(recruitmentService.getAllRecruitmentAndSortByDate(pageable)); } - @ApiOperation(value = "급여 높은 순서대로 정리해서 전체 구인글 반환하는 메서드") + @Operation(summary = "급여 높은 순서대로 정리해서 전체 구인글 반환하는 메서드") @GetMapping("/salary") public ResponseEntity> getAllRecruitmentsSalary( @RequestParam int page diff --git a/src/main/java/team18/team18_be/recruitment/entity/RecruitmentContent.java b/src/main/java/team18/team18_be/recruitment/entity/RecruitmentContent.java index 0cfed7d..51048da 100644 --- a/src/main/java/team18/team18_be/recruitment/entity/RecruitmentContent.java +++ b/src/main/java/team18/team18_be/recruitment/entity/RecruitmentContent.java @@ -1,5 +1,6 @@ package team18.team18_be.recruitment.entity; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; @@ -13,8 +14,10 @@ public class RecruitmentContent { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long resumeContentId; @Lob + @Column(columnDefinition = "TEXT") private String koreanDetailedDescription; @Lob + @Column(columnDefinition = "TEXT") private String vietnameseDetailedDescription; public RecruitmentContent(String koreanDetailedDescription, diff --git a/src/main/java/team18/team18_be/resume/controller/ResumeController.java b/src/main/java/team18/team18_be/resume/controller/ResumeController.java index 4d969db..584799e 100644 --- a/src/main/java/team18/team18_be/resume/controller/ResumeController.java +++ b/src/main/java/team18/team18_be/resume/controller/ResumeController.java @@ -1,7 +1,7 @@ package team18.team18_be.resume.controller; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -17,7 +17,7 @@ import team18.team18_be.resume.dto.response.ResumeResponse; import team18.team18_be.resume.service.ResumeService; -@Api(tags = {"이력서 관련 Controller"}) +@Tag(name = "이력서 관련 Controller") @RestController @RequestMapping("/api/resumes") public class ResumeController { @@ -28,7 +28,7 @@ public ResumeController(ResumeService resumeService) { this.resumeService = resumeService; } - @ApiOperation(value = "이력서 저장 메서드") + @Operation(summary = "이력서 저장 메서드") @PostMapping public ResponseEntity saveResume( @RequestBody ResumeRequest resumeRequest, @@ -38,7 +38,7 @@ public ResponseEntity saveResume( return new ResponseEntity<>(HttpStatus.CREATED); } - @ApiOperation(value = "구직자 별 이력서 조회 메서드") + @Operation(summary = "구직자 별 이력서 조회 메서드") @GetMapping public ResponseEntity getResume( @LoginUser User user @@ -46,7 +46,7 @@ public ResponseEntity getResume( return ResponseEntity.ok().body(resumeService.findResumeByEmployee(user)); } - @ApiOperation(value = "이력서 id로 이력서 조회 메서드") + @Operation(summary = "이력서 id로 이력서 조회 메서드") @GetMapping("/{resumeId}/{applyId}") public ResponseEntity getResumeById( @PathVariable Long resumeId, diff --git a/src/main/java/team18/team18_be/resume/entity/Resume.java b/src/main/java/team18/team18_be/resume/entity/Resume.java index 3705077..f75bca8 100644 --- a/src/main/java/team18/team18_be/resume/entity/Resume.java +++ b/src/main/java/team18/team18_be/resume/entity/Resume.java @@ -1,5 +1,6 @@ package team18.team18_be.resume.entity; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; @@ -25,6 +26,7 @@ public class Resume { private String career; private String korean; @Lob + @Column(columnDefinition = "TEXT") private String selfIntroduction; @ManyToOne