From 201e9e7cba3b531671a6de8bb8fd9b63eadac0a9 Mon Sep 17 00:00:00 2001 From: JuHeon <75869755+rlawngjs0313@users.noreply.github.com> Date: Fri, 15 Aug 2025 02:35:38 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=9A=80=20chore:=20=EC=84=9C=EB=B2=84?= =?UTF-8?q?=20=ED=98=84=ED=99=A9=ED=91=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a823dc2..4d3e939a 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,9 @@ VECO는 **AI를 활용해 분산된 정보를 한곳에 모으고, 목표를 명 - 마크/김주헌: 목표, Slack 연동 --- ## 🛜 서버 현황 -스크린샷 2025-08-09 04 46 30 +476164894-f109d3c6-85dd-4725-9ae0-59a8ef432026 - main-develop 브랜치 구조에 따라 배포환경, 개발환경을 따로 구성 - 개발 환경(localhost:5173)과 배포 환경(web.vecoservice.shop)간 테스트를 진행 - 추후, 서버를 통합 관리해 무중단 배포 전략(블루-그린) 사용 + From 476b659d34174a3e1b6b7ed515b03c407b40bd53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=8A=B9=EB=B2=94?= Date: Fri, 15 Aug 2025 17:18:18 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Refactor:#133=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20API=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comment/controller/CommentController.java | 3 +- .../comment/converter/CommentConverter.java | 25 ++++++-------- .../dto/response/CommentResponseDTO.java | 34 +++++++++++++++++++ .../comment/service/CommentService.java | 3 +- .../comment/service/CommentServiceImpl.java | 9 ++--- .../Veco/domain/external/entity/External.java | 2 +- .../global/auth/jwt/filter/JwtAuthFilter.java | 2 +- .../Veco/global/config/SecurityConfig.java | 2 +- 8 files changed, 57 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/example/Veco/domain/comment/dto/response/CommentResponseDTO.java diff --git a/src/main/java/com/example/Veco/domain/comment/controller/CommentController.java b/src/main/java/com/example/Veco/domain/comment/controller/CommentController.java index cb023157..55928782 100644 --- a/src/main/java/com/example/Veco/domain/comment/controller/CommentController.java +++ b/src/main/java/com/example/Veco/domain/comment/controller/CommentController.java @@ -2,6 +2,7 @@ import com.example.Veco.domain.comment.dto.request.CommentCreateDTO; import com.example.Veco.domain.comment.dto.response.CommentListResponseDTO; +import com.example.Veco.domain.comment.dto.response.CommentResponseDTO; import com.example.Veco.domain.comment.service.CommentService; import com.example.Veco.global.apiPayload.ApiResponse; import com.example.Veco.global.enums.Category; @@ -72,7 +73,7 @@ public ApiResponse createComment( ) }) @GetMapping - public ApiResponse getAllComments( + public ApiResponse getAllComments( @Parameter(description = "댓글을 조회할 대상 리소스의 ID", required = true, example = "1") @RequestParam("targetId") Long targetId, @Parameter(description = "리소스 카테고리 (ISSUE, GOAL, EXTERNAL)", required = true, example = "ISSUE") diff --git a/src/main/java/com/example/Veco/domain/comment/converter/CommentConverter.java b/src/main/java/com/example/Veco/domain/comment/converter/CommentConverter.java index a82aab6d..23764251 100644 --- a/src/main/java/com/example/Veco/domain/comment/converter/CommentConverter.java +++ b/src/main/java/com/example/Veco/domain/comment/converter/CommentConverter.java @@ -2,6 +2,7 @@ import com.example.Veco.domain.comment.dto.request.CommentCreateDTO; import com.example.Veco.domain.comment.dto.response.CommentListResponseDTO; +import com.example.Veco.domain.comment.dto.response.CommentResponseDTO; import com.example.Veco.domain.comment.entity.Comment; import com.example.Veco.domain.comment.entity.CommentRoom; import com.example.Veco.domain.member.entity.Member; @@ -22,30 +23,26 @@ public static Comment toComment(CommentCreateDTO commentCreateDTO, CommentRoom c return comment; } - public static CommentListResponseDTO toCommentResponseDTO(List comments) { + public static CommentResponseDTO.CommentListDTO toCommentListDTO(List comments) { - List commentResponseDTOS = new ArrayList<>(); + List commentInfoDTOS = new ArrayList<>(); comments.forEach(comment -> { - CommentListResponseDTO.AuthorResponseDTO authorDTO = CommentListResponseDTO.AuthorResponseDTO.builder() - .authorId(comment.getMember().getId()) - .authorName(comment.getMember().getName()) - .profileImageUrl(comment.getMember().getProfile().getProfileImageUrl()) - .build(); - CommentListResponseDTO.CommentResponseDTO commentDTO = CommentListResponseDTO.CommentResponseDTO.builder() - .commentId(comment.getId()) + CommentResponseDTO.CommentInfoDTO commentDTO = CommentResponseDTO.CommentInfoDTO.builder() + .id(comment.getId()) .content(comment.getContent()) - .author(authorDTO) .createdAt(comment.getCreatedAt()) + .name(comment.getMember().getName()) + .profileUrl(comment.getMember().getProfile().getProfileImageUrl()) .build(); - commentResponseDTOS.add(commentDTO); + commentInfoDTOS.add(commentDTO); }); - return CommentListResponseDTO.builder() - .comments(commentResponseDTOS) - .totalSize(comments.size()) + return CommentResponseDTO.CommentListDTO.builder() + .cnt(commentInfoDTOS.size()) + .info(commentInfoDTOS) .build(); } } diff --git a/src/main/java/com/example/Veco/domain/comment/dto/response/CommentResponseDTO.java b/src/main/java/com/example/Veco/domain/comment/dto/response/CommentResponseDTO.java new file mode 100644 index 00000000..154b569d --- /dev/null +++ b/src/main/java/com/example/Veco/domain/comment/dto/response/CommentResponseDTO.java @@ -0,0 +1,34 @@ +package com.example.Veco.domain.comment.dto.response; + +import com.example.Veco.domain.external.dto.response.ExternalResponseDTO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; +import java.util.List; + +public class CommentResponseDTO { + + @Getter + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class CommentListDTO { + private Integer cnt; + List info; + } + + @Getter + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class CommentInfoDTO { + private Long id; + private String profileUrl; + private String name; + private LocalDateTime createdAt; + private String content; + } +} diff --git a/src/main/java/com/example/Veco/domain/comment/service/CommentService.java b/src/main/java/com/example/Veco/domain/comment/service/CommentService.java index a25f7160..096c9711 100644 --- a/src/main/java/com/example/Veco/domain/comment/service/CommentService.java +++ b/src/main/java/com/example/Veco/domain/comment/service/CommentService.java @@ -2,11 +2,12 @@ import com.example.Veco.domain.comment.dto.request.CommentCreateDTO; import com.example.Veco.domain.comment.dto.response.CommentListResponseDTO; +import com.example.Veco.domain.comment.dto.response.CommentResponseDTO; import com.example.Veco.global.enums.Category; import java.util.List; public interface CommentService { Long addComment(CommentCreateDTO commentCreateDTO); - CommentListResponseDTO getComments(Long targetId, Category category); + CommentResponseDTO.CommentListDTO getComments(Long targetId, Category category); } diff --git a/src/main/java/com/example/Veco/domain/comment/service/CommentServiceImpl.java b/src/main/java/com/example/Veco/domain/comment/service/CommentServiceImpl.java index 88a6c667..1d497998 100644 --- a/src/main/java/com/example/Veco/domain/comment/service/CommentServiceImpl.java +++ b/src/main/java/com/example/Veco/domain/comment/service/CommentServiceImpl.java @@ -4,6 +4,7 @@ import com.example.Veco.domain.comment.converter.CommentRoomConverter; import com.example.Veco.domain.comment.dto.request.CommentCreateDTO; import com.example.Veco.domain.comment.dto.response.CommentListResponseDTO; +import com.example.Veco.domain.comment.dto.response.CommentResponseDTO; import com.example.Veco.domain.comment.entity.Comment; import com.example.Veco.domain.comment.entity.CommentRoom; import com.example.Veco.domain.comment.repository.CommentRepository; @@ -58,19 +59,19 @@ public Long addComment(CommentCreateDTO commentCreateDTO) { } @Transactional(readOnly = true) - public CommentListResponseDTO getComments(Long targetId, Category category) { + public CommentResponseDTO.CommentListDTO getComments(Long targetId, Category category) { // 리소스 존재 여부 검증 validateResourceExists(targetId, category); CommentRoom commentRoom = commentRoomRepository.findByRoomTypeAndTargetId(category, targetId); if (commentRoom == null) { - return CommentConverter.toCommentResponseDTO(new ArrayList<>()); // 댓글방이 없으면 빈 리스트 반환 + return CommentConverter.toCommentListDTO(new ArrayList<>()); // 댓글방이 없으면 빈 리스트 반환 } - List comments = commentRepository.findAllByCommentRoomOrderByIdDesc(commentRoom); + List comments = commentRepository.findAllByCommentRoomOrderByIdAsc(commentRoom); - return CommentConverter.toCommentResponseDTO(comments); + return CommentConverter.toCommentListDTO(comments); } private CommentRoom findOrCreateCommentRoom(Long resourceId, Category resourceType) { diff --git a/src/main/java/com/example/Veco/domain/external/entity/External.java b/src/main/java/com/example/Veco/domain/external/entity/External.java index 89c5d934..f9dec9c0 100644 --- a/src/main/java/com/example/Veco/domain/external/entity/External.java +++ b/src/main/java/com/example/Veco/domain/external/entity/External.java @@ -83,7 +83,7 @@ public class External extends BaseEntity { @JoinColumn(name = "goal_id") private Goal goal; - @OneToMany(mappedBy = "external", cascade = CascadeType.PERSIST) + @OneToMany(mappedBy = "external", cascade = CascadeType.ALL) @Builder.Default private List assignments = new ArrayList<>(); diff --git a/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java b/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java index a4b73d2f..0aef295e 100644 --- a/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java +++ b/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java @@ -35,7 +35,7 @@ public class JwtAuthFilter extends OncePerRequestFilter { private static final AntPathMatcher pathMatcher = new AntPathMatcher(); private static final String[] excludePaths = {"/healthcheck", "/api/test/login/", "/api/token/reissue", "/login-test.html", "/v3/api-docs/**", "/swagger-ui/**", "/swagger-resources/**", "/css/**", "/images/**", "/js/**", - "/h2-console/**", "/profile", "/github/**", "/api/github/webhook/**"}; + "/h2-console/**", "/profile", "/github/**", "/api/github/webhook/**", "/**"}; @Override protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException { diff --git a/src/main/java/com/example/Veco/global/config/SecurityConfig.java b/src/main/java/com/example/Veco/global/config/SecurityConfig.java index 914db25a..84235553 100644 --- a/src/main/java/com/example/Veco/global/config/SecurityConfig.java +++ b/src/main/java/com/example/Veco/global/config/SecurityConfig.java @@ -44,7 +44,7 @@ protected SecurityFilterChain configure(HttpSecurity http) throws Exception { .authorizeHttpRequests(auth -> auth .requestMatchers("/api/test/**", "/api/teams/*/externals/**", "/api/teams/*/externals", "/api/test/login", "/api/token/reissue", "/login-test.html", "/v3/api-docs/**", "/swagger-ui/**", "/swagger-resources/**", "/css/**", "/images/**", "/healthcheck", - "/js/**", "/h2-console/**", "/profile","/workspace/create-url","/slack/callback", "/github/**","/api/github/**").permitAll() + "/js/**", "/h2-console/**", "/profile","/workspace/create-url","/slack/callback", "/github/**","/api/github/**", "/**").permitAll() .anyRequest().authenticated() ) .httpBasic(AbstractHttpConfigurer::disable) From 66253f323266548ad4cb8cb3aca9ca9e1bb381ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=8A=B9=EB=B2=94?= Date: Fri, 15 Aug 2025 17:24:27 +0900 Subject: [PATCH 3/5] =?UTF-8?q?Refactor:#133=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20API=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java | 2 +- .../java/com/example/Veco/global/config/SecurityConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java b/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java index 0aef295e..a4b73d2f 100644 --- a/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java +++ b/src/main/java/com/example/Veco/global/auth/jwt/filter/JwtAuthFilter.java @@ -35,7 +35,7 @@ public class JwtAuthFilter extends OncePerRequestFilter { private static final AntPathMatcher pathMatcher = new AntPathMatcher(); private static final String[] excludePaths = {"/healthcheck", "/api/test/login/", "/api/token/reissue", "/login-test.html", "/v3/api-docs/**", "/swagger-ui/**", "/swagger-resources/**", "/css/**", "/images/**", "/js/**", - "/h2-console/**", "/profile", "/github/**", "/api/github/webhook/**", "/**"}; + "/h2-console/**", "/profile", "/github/**", "/api/github/webhook/**"}; @Override protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException { diff --git a/src/main/java/com/example/Veco/global/config/SecurityConfig.java b/src/main/java/com/example/Veco/global/config/SecurityConfig.java index 84235553..914db25a 100644 --- a/src/main/java/com/example/Veco/global/config/SecurityConfig.java +++ b/src/main/java/com/example/Veco/global/config/SecurityConfig.java @@ -44,7 +44,7 @@ protected SecurityFilterChain configure(HttpSecurity http) throws Exception { .authorizeHttpRequests(auth -> auth .requestMatchers("/api/test/**", "/api/teams/*/externals/**", "/api/teams/*/externals", "/api/test/login", "/api/token/reissue", "/login-test.html", "/v3/api-docs/**", "/swagger-ui/**", "/swagger-resources/**", "/css/**", "/images/**", "/healthcheck", - "/js/**", "/h2-console/**", "/profile","/workspace/create-url","/slack/callback", "/github/**","/api/github/**", "/**").permitAll() + "/js/**", "/h2-console/**", "/profile","/workspace/create-url","/slack/callback", "/github/**","/api/github/**").permitAll() .anyRequest().authenticated() ) .httpBasic(AbstractHttpConfigurer::disable) From df2df18b42508932b4b2727af9506dec66ff8e1d Mon Sep 17 00:00:00 2001 From: rlawngjs0313 Date: Fri, 15 Aug 2025 13:33:50 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20=ED=95=84?= =?UTF-8?q?=EC=9A=94=EC=97=86=EB=8A=94=20API=20=EC=88=A8=EA=B9=80=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Veco/global/healthcheck/HealthCheckController.java | 2 ++ .../java/com/example/Veco/test/TestDataController.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/Veco/global/healthcheck/HealthCheckController.java b/src/main/java/com/example/Veco/global/healthcheck/HealthCheckController.java index 7c892552..86796418 100644 --- a/src/main/java/com/example/Veco/global/healthcheck/HealthCheckController.java +++ b/src/main/java/com/example/Veco/global/healthcheck/HealthCheckController.java @@ -1,5 +1,6 @@ package com.example.Veco.global.healthcheck; +import io.swagger.v3.oas.annotations.Hidden; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -7,6 +8,7 @@ public class HealthCheckController { @GetMapping("/healthcheck") + @Hidden public String healthcheck() { return "OK"; } diff --git a/src/main/java/com/example/Veco/test/TestDataController.java b/src/main/java/com/example/Veco/test/TestDataController.java index 23a388e0..1369851a 100644 --- a/src/main/java/com/example/Veco/test/TestDataController.java +++ b/src/main/java/com/example/Veco/test/TestDataController.java @@ -12,14 +12,17 @@ import com.example.Veco.domain.member.repository.MemberRepository; import com.example.Veco.domain.team.entity.Team; import com.example.Veco.domain.team.repository.TeamRepository; -import com.example.Veco.global.enums.*; +import com.example.Veco.global.enums.Category; +import com.example.Veco.global.enums.ExtServiceType; +import com.example.Veco.global.enums.Priority; +import com.example.Veco.global.enums.State; +import io.swagger.v3.oas.annotations.Hidden; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.time.LocalDate; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @@ -43,6 +46,7 @@ public class TestDataController { private AssigmentRepository assignmentRepository; @PostMapping("/insert-test-data") + @Hidden public String insertTestData() { try { // 1. Member 테스트 데이터 From ca9c268b8fbd089a11e1d083475f9ed0e4919df6 Mon Sep 17 00:00:00 2001 From: rlawngjs0313 Date: Fri, 15 Aug 2025 20:01:03 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=90=9B=20hotfix:=20=EC=9D=B4=EC=8A=88?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=20=EC=8B=9C,=20Goal=20=EC=97=AC=EB=B6=80?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=20(=ED=95=84=EC=88=98=20->=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issue/service/command/IssueCommandServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/Veco/domain/issue/service/command/IssueCommandServiceImpl.java b/src/main/java/com/example/Veco/domain/issue/service/command/IssueCommandServiceImpl.java index d038caca..6b49d496 100644 --- a/src/main/java/com/example/Veco/domain/issue/service/command/IssueCommandServiceImpl.java +++ b/src/main/java/com/example/Veco/domain/issue/service/command/IssueCommandServiceImpl.java @@ -1,8 +1,6 @@ package com.example.Veco.domain.issue.service.command; import com.example.Veco.domain.goal.entity.Goal; -import com.example.Veco.domain.goal.exception.GoalException; -import com.example.Veco.domain.goal.exception.code.GoalErrorCode; import com.example.Veco.domain.goal.repository.GoalRepository; import com.example.Veco.domain.issue.converter.IssueConverter; import com.example.Veco.domain.issue.dto.IssueReqDTO; @@ -128,8 +126,10 @@ public IssueResponseDTO.CreateIssue createIssue(AuthUser user, Long teamId, Issu .orElseThrow(() -> new MemberHandler(MemberErrorStatus._FORBIDDEN)); // 목표 존재 검증 - Goal goal = goalRepository.findById(dto.goalId()).orElseThrow(()-> - new GoalException(GoalErrorCode.NOT_FOUND)); + Goal goal = null; + if (dto.goalId() != null) { + goal = goalRepository.findById(dto.goalId()).orElse(null); + } RLock lock = redissonClient.getLock("lock:issue:" + teamId); Long issueId;