Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
0c3a641
[SRLT-113] Refactor: 개발가이드를 최신화한다
SeongHo5356 Dec 28, 2025
bdbf06e
Merge branch 'develop' into SRLT-113-클래스명-정리
SeongHo5356 Dec 28, 2025
6f9a297
[SRLT-113] Refactor: ExpertApplication 파일 구조를 수정한다
SeongHo5356 Dec 28, 2025
4fb357c
[SRLT-113] Refactor: expertReport CQRS 분리하기 및 조회/포트 네이밍 정리
SeongHo5356 Dec 28, 2025
0455c0c
[SRLT-113] Refactor: ExpertReportDetail에서 ExpertReportComment로 엔티티명을 …
SeongHo5356 Dec 28, 2025
1ccef08
[SRLT-113] Refactor: 수정된 ExpertReport 에 따라 테스트 코드를 수정한다
SeongHo5356 Dec 28, 2025
05a7350
[SRLT-113] Refactor: Order도메인을 컨벤션에 맞게 정리하고, SwaggerDoc을 작성한다
SeongHo5356 Dec 28, 2025
75510da
[SRLT-113] Refactor: Usage도메인을 컨벤션에 맞게 정리한다
SeongHo5356 Dec 28, 2025
2c8f660
[SRLT-113] Refactor: ExpertApplication 도메인을 컨벤션에 맞게 정리한다
SeongHo5356 Dec 29, 2025
3c15885
[SRLT-113] Refactor: 전문가 조회 시 필터링을 제거한다
SeongHo5356 Dec 29, 2025
abf6aac
[SRLT-113] Refactor: adapter/ncp위 위치르를 adpater/aireport 안쪽으로 옮긴다
SeongHo5356 Dec 29, 2025
f680970
[SRLT-113] Test: 경로 변경에 다른 import 문을 추가한다
SeongHo5356 Dec 29, 2025
e5b1ef4
[SRLT-113] Refactor: @deprecated 애노테이션에 문서화를 추가한다
SeongHo5356 Dec 29, 2025
e6d1844
[SRLT-113] Refactor: 필드명도 일관되게 수정한다
SeongHo5356 Dec 29, 2025
b634b5a
[SRLT-113] Docs: 도메인모델과 용어사전을 최신화한다
SeongHo5356 Dec 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
package starlight.adapter.ncp.clova.infra;
package starlight.adapter.aireport.infrastructure.clova.infra;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestClient;
import starlight.shared.dto.infrastructure.ClovaStudioResponse;
import starlight.adapter.ncp.clova.util.ClovaUtil;
import starlight.adapter.aireport.infrastructure.clova.util.ClovaUtil;

import java.util.Map;

/**
* Clova Studio API 호출 클라이언트.
*
* @deprecated 1.4.0 현재 사용 경로가 없으며, 필요 시 재도입할 수 있어 유지 중입니다.
* 대체 구현체는 없습니다.
*/
@Component
@Deprecated(since = "1.4.0", forRemoval = false)
public class ClovaStudioClient {

private final RestClient restClient;

public ClovaStudioClient(@Qualifier("clovaClient") RestClient restClient) {
public ClovaStudioClient(@Qualifier("clovaStudioRestClient") RestClient restClient) {
this.restClient = restClient;
}

Expand All @@ -28,4 +35,4 @@ public ClovaStudioResponse check(String systemMsg, String userMsg, int criteriaS
.retrieve()
.body(ClovaStudioResponse.class);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.clova.util;
package starlight.adapter.aireport.infrastructure.clova.util;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -8,6 +8,13 @@
import java.util.List;
import java.util.Map;

/**
* Clova Studio API 요청/응답 보조 유틸리티.
*
* @deprecated 1.4.0 현재 사용 경로가 없으며, 필요 시 재도입할 수 있어 유지 중입니다.
* 대체 구현체는 없습니다.
*/
@Deprecated(since = "1.4.0", forRemoval = false)
public final class ClovaUtil {

public static Map<String, Object> buildClovaRequestBody(String systemMsg, String userMsg, int n){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package starlight.adapter.ncp.ocr;
package starlight.adapter.aireport.infrastructure.ocr;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import starlight.adapter.ncp.ocr.exception.OcrException;
import starlight.adapter.ncp.ocr.infra.ClovaOcrClient;
import starlight.adapter.ncp.ocr.infra.PdfDownloadClient;
import starlight.adapter.ncp.ocr.util.OcrResponseMerger;
import starlight.adapter.ncp.ocr.util.OcrTextExtractor;
import starlight.adapter.ncp.ocr.util.PdfUtils;
import starlight.application.infrastructure.provided.OcrProvider;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrException;
import starlight.adapter.aireport.infrastructure.ocr.infra.ClovaOcrClient;
import starlight.adapter.aireport.infrastructure.ocr.infra.PdfDownloadClient;
import starlight.adapter.aireport.infrastructure.ocr.util.OcrResponseMerger;
import starlight.adapter.aireport.infrastructure.ocr.util.OcrTextExtractor;
import starlight.adapter.aireport.infrastructure.ocr.util.PdfUtils;
import starlight.application.aireport.required.OcrProvider;
import starlight.shared.dto.infrastructure.OcrResponse;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.ocr.dto;
package starlight.adapter.aireport.infrastructure.ocr.dto;


import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.ocr.exception;
package starlight.adapter.aireport.infrastructure.ocr.exception;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.ocr.exception;
package starlight.adapter.aireport.infrastructure.ocr.exception;

import starlight.shared.apiPayload.exception.ErrorType;
import starlight.shared.apiPayload.exception.GlobalException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package starlight.adapter.ncp.ocr.infra;
package starlight.adapter.aireport.infrastructure.ocr.infra;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestClient;
import starlight.adapter.ncp.ocr.dto.ClovaOcrRequest;
import starlight.adapter.ncp.ocr.exception.OcrErrorType;
import starlight.adapter.ncp.ocr.exception.OcrException;
import starlight.adapter.aireport.infrastructure.ocr.dto.ClovaOcrRequest;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrErrorType;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrException;
import starlight.shared.dto.infrastructure.OcrResponse;

@Slf4j
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package starlight.adapter.ncp.ocr.infra;
package starlight.adapter.aireport.infrastructure.ocr.infra;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestClient;
import starlight.adapter.ncp.ocr.exception.OcrErrorType;
import starlight.adapter.ncp.ocr.exception.OcrException;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrErrorType;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrException;

import java.net.URI;

Expand All @@ -18,7 +18,7 @@ public class PdfDownloadClient {

private final RestClient pdfDownloadClient;

public PdfDownloadClient(@Qualifier("downloadClient") RestClient downloadClient) {
public PdfDownloadClient(@Qualifier("pdfDownloadRestClient") RestClient downloadClient) {
this.pdfDownloadClient = downloadClient;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.ocr.util;
package starlight.adapter.aireport.infrastructure.ocr.util;

import starlight.shared.dto.infrastructure.OcrResponse;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.ocr.util;
package starlight.adapter.aireport.infrastructure.ocr.util;

import starlight.shared.dto.infrastructure.OcrResponse;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package starlight.adapter.ncp.ocr.util;
package starlight.adapter.aireport.infrastructure.ocr.util;

import lombok.extern.slf4j.Slf4j;
import org.apache.pdfbox.pdmodel.PDDocument;
import starlight.adapter.ncp.ocr.exception.OcrErrorType;
import starlight.adapter.ncp.ocr.exception.OcrException;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrErrorType;
import starlight.adapter.aireport.infrastructure.ocr.exception.OcrException;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.storage;
package starlight.adapter.aireport.infrastructure.storage;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand All @@ -12,7 +12,7 @@
import software.amazon.awssdk.services.s3.presigner.S3Presigner;
import software.amazon.awssdk.services.s3.presigner.model.PresignedPutObjectRequest;
import software.amazon.awssdk.services.s3.presigner.model.PutObjectPresignRequest;
import starlight.application.infrastructure.provided.PresignedUrlProvider;
import starlight.application.aireport.required.PresignedUrlProvider;
import starlight.shared.dto.infrastructure.PreSignedUrlResponse;

import java.net.URLEncoder;
Expand All @@ -25,7 +25,7 @@
public class NcpPresignedUrlProvider implements PresignedUrlProvider {

private final S3Client ncpS3Client;
private final S3Presigner s3Presigner;
private final S3Presigner ncpS3Presigner;

@Value("${cloud.ncp.object-storage.bucket-name}")
private String bucket;
Expand Down Expand Up @@ -55,7 +55,7 @@ public PreSignedUrlResponse getPreSignedUrl(Long userId, String originalFileName
.putObjectRequest(putObjectRequest)
.build();

PresignedPutObjectRequest presignedRequest = s3Presigner.presignPutObject(presignRequest);
PresignedPutObjectRequest presignedRequest = ncpS3Presigner.presignPutObject(presignRequest);

String presignedUrl = presignedRequest.url().toString();
String objectUrl = buildObjectUrl(key);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package starlight.adapter.ncp.webapi;
package starlight.adapter.aireport.webapi;

import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;
import starlight.adapter.auth.security.auth.AuthDetails;
import starlight.shared.dto.infrastructure.PreSignedUrlResponse;
import starlight.application.infrastructure.provided.PresignedUrlProvider;
import starlight.adapter.ncp.webapi.swagger.ImageApiDoc;
import starlight.application.aireport.required.PresignedUrlProvider;
import starlight.adapter.aireport.webapi.swagger.ImageApiDoc;
import starlight.shared.apiPayload.response.ApiResponse;

@RestController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package starlight.adapter.ncp.webapi.swagger;
package starlight.adapter.aireport.webapi.swagger;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down
23 changes: 0 additions & 23 deletions src/main/java/starlight/adapter/expert/persistence/ExpertJpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
import org.springframework.stereotype.Component;
import starlight.application.expert.required.ExpertQueryPort;
import starlight.domain.expert.entity.Expert;
import starlight.domain.expert.enumerate.TagCategory;
import starlight.domain.expert.exception.ExpertErrorType;
import starlight.domain.expert.exception.ExpertException;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -62,27 +60,6 @@ public List<Expert> findAllWithCareersTagsCategories() {
}
}

@Override
public List<Expert> findByAllCategories(Collection<TagCategory> categories) {
try {
List<Expert> experts = repository.findByAllCategories(categories, categories.size());
if (experts.isEmpty()) {
return experts;
}

List<Long> ids = experts.stream()
.map(Expert::getId)
.toList();

fetchWithCollections(ids);

return experts;
} catch (Exception e) {
log.error("전문가 목록 필터링 중 오류가 발생했습니다.", e);
throw new ExpertException(ExpertErrorType.EXPERT_QUERY_ERROR);
}
}

@Override
public Map<Long, Expert> findByIds(Set<Long> expertIds) {
List<Expert> experts = repository.findAllByIds(expertIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import starlight.domain.expert.entity.Expert;
import starlight.domain.expert.enumerate.TagCategory;

import java.util.Collection;
import java.util.List;
import java.util.Set;

Expand All @@ -27,15 +24,4 @@ public interface ExpertRepository extends JpaRepository<Expert, Long> {
@Query("select distinct e from Expert e where e.id in :expertIds")
List<Expert> findAllByIds(Set<Long> expertIds);

@Query("""
select distinct e from Expert e where e.id in (
select e2.id
from Expert e2
join e2.categories c2
where c2 in :cats
group by e2.id
having count(distinct c2) = :size)
""")
List<Expert> findByAllCategories(@Param("cats") Collection<TagCategory> cats,
@Param("size") long size);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import starlight.adapter.expert.webapi.dto.ExpertDetailResponse;
import starlight.adapter.expert.webapi.dto.ExpertListResponse;
import starlight.adapter.expert.webapi.swagger.ExpertQueryApiDoc;
import starlight.application.expert.provided.ExpertDetailQueryUseCase;
import starlight.domain.expert.enumerate.TagCategory;
import starlight.shared.apiPayload.response.ApiResponse;

import java.util.List;
import java.util.Set;

@RestController
@RequiredArgsConstructor
Expand All @@ -24,10 +21,8 @@ public class ExpertController implements ExpertQueryApiDoc {
private final ExpertDetailQueryUseCase expertDetailQuery;

@GetMapping
public ApiResponse<List<ExpertListResponse>> search(
@RequestParam(name = "categories", required = false) Set<TagCategory> categories
) {
return ApiResponse.success(ExpertListResponse.fromAll(expertDetailQuery.search(categories)));
public ApiResponse<List<ExpertListResponse>> search() {
return ApiResponse.success(ExpertListResponse.fromAll(expertDetailQuery.searchAll()));
}

@GetMapping("/{expertId}")
Expand Down
Loading
Loading