diff --git a/src/main/java/com/artistack/project/service/ProjectService.java b/src/main/java/com/artistack/project/service/ProjectService.java index 2db71a1..c4fe35b 100644 --- a/src/main/java/com/artistack/project/service/ProjectService.java +++ b/src/main/java/com/artistack/project/service/ProjectService.java @@ -91,7 +91,7 @@ public Page getMyWithPaging(Pageable pageable) { // 프로젝트 정보 조회 public ProjectDto getById(Long projectId) { - if(projectRepository.findById(projectId).isEmpty()) { + if (projectRepository.findById(projectId).isEmpty()) { throw new GeneralException(Code.PROJECT_NOT_FOUND, "프로젝트를 찾을 수 없습니다."); } @@ -242,9 +242,12 @@ public List getPrevStackers(Long projectId, Boolean current, Boolean se Project project = projectRepository.findById(prevProjectId) .orElseThrow(() -> new GeneralException(Code.PROJECT_NOT_FOUND, "프로젝트를 찾을 수 없습니다.")); - UserDto userDto = getSearchStackResponse(project.getId()); - stackers.add(userDto); - + if (project.getScope().equals(Scope.DELETED)) { + stackers.add(UserDto.builder().project(ProjectDto.builder().scope(Scope.DELETED).build()).build()); + } else { + UserDto userDto = getSearchStackResponse(project.getId()); + stackers.add(userDto); + } prevProjectId = project.getPrevProjectId(); } @@ -266,8 +269,12 @@ public List getPrevStackers(Long projectId, Boolean current, Boolean se Project project = projectRepository.findById(prevProjectId) .orElseThrow(() -> new GeneralException(Code.PROJECT_NOT_FOUND, "프로젝트를 찾을 수 없습니다.")); - UserDto userDto = getStackResponse(project.getId()); - stackers.add(userDto); + if (project.getScope().equals(Scope.DELETED)) { + stackers.add(UserDto.builder().project(ProjectDto.builder().scope(Scope.DELETED).build()).build()); + } else { + UserDto userDto = getStackResponse(project.getId()); + stackers.add(userDto); + } prevProjectId = project.getPrevProjectId(); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7015e0a..09a51f7 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,19 +1,15 @@ -server.port=8080 - -spring.jpa.show-sql=true +# profile +spring.profiles.include=dev spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect -#spring.jpa.properties.hibernate.dialect.storage_engine=innodb -#spring.datasource.hikari.jdbc-url=jdbc:h2:mem://localhost/~/testdb;MODE=MYSQL -# -#spring.h2.console.enabled=true -#spring.datasource.generate-unique-name=false -spring.datasource.driver-class-name=org.h2.Driver -spring.datasource.url=jdbc:h2:mem://localhost/~/testdb +# port +server.port=8080 -logging.level.com.artistack=trace +# test +server.servlet.encoding.force-response=true +# aws cloud.aws.region.static=ap-northeast-2 cloud.aws.s3.bucket=artistack-bucket