diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/HealthCheckController.java b/delivery-relay-service/src/main/java/com/inbobwetrust/controller/HealthCheckController.java similarity index 94% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/HealthCheckController.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/controller/HealthCheckController.java index 068ec50b..013715f5 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/HealthCheckController.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/controller/HealthCheckController.java @@ -1,4 +1,4 @@ -package com.inbobwetrust.relay; +package com.inbobwetrust.controller; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/RelayController.java b/delivery-relay-service/src/main/java/com/inbobwetrust/controller/RelayController.java similarity index 81% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/RelayController.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/controller/RelayController.java index e14bb9e7..0b1be2e5 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/RelayController.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/controller/RelayController.java @@ -1,14 +1,16 @@ -package com.inbobwetrust.relay; +package com.inbobwetrust.controller; -import com.inbobwetrust.relay.domain.Delivery; -import com.inbobwetrust.relay.domain.ReceiverType; -import com.inbobwetrust.relay.domain.RelayRequest; -import javax.validation.Valid; +import com.inbobwetrust.domain.Delivery; +import com.inbobwetrust.domain.ReceiverType; +import com.inbobwetrust.domain.RelayRequest; +import com.inbobwetrust.repository.RelayRepository; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import reactor.core.publisher.Mono; +import javax.validation.Valid; + @RestController @RequiredArgsConstructor @RequestMapping(value = "/relay/v1") diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/Delivery.java b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/Delivery.java similarity index 97% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/Delivery.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/domain/Delivery.java index e3a3c85c..7173699c 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/Delivery.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/Delivery.java @@ -1,4 +1,4 @@ -package com.inbobwetrust.relay.domain; +package com.inbobwetrust.domain; import com.fasterxml.jackson.annotation.JsonFormat; import java.time.LocalDateTime; diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/DeliveryStatus.java b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/DeliveryStatus.java similarity index 92% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/DeliveryStatus.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/domain/DeliveryStatus.java index da6ca998..0982e0ad 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/DeliveryStatus.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/DeliveryStatus.java @@ -1,4 +1,4 @@ -package com.inbobwetrust.relay.domain; +package com.inbobwetrust.domain; public enum DeliveryStatus { DECLINED("접수", "접수"), diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/ReceiverType.java b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/ReceiverType.java similarity index 55% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/ReceiverType.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/domain/ReceiverType.java index b38e7685..247f6827 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/ReceiverType.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/ReceiverType.java @@ -1,4 +1,4 @@ -package com.inbobwetrust.relay.domain; +package com.inbobwetrust.domain; public enum ReceiverType { SHOP, diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/RelayRequest.java b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/RelayRequest.java similarity index 93% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/RelayRequest.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/domain/RelayRequest.java index 8423d2d9..c0fb4d63 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/domain/RelayRequest.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/domain/RelayRequest.java @@ -1,4 +1,4 @@ -package com.inbobwetrust.relay.domain; +package com.inbobwetrust.domain; import lombok.Data; import org.springframework.data.annotation.Id; diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/ExceptionHandlerAdvice.java b/delivery-relay-service/src/main/java/com/inbobwetrust/exception/ExceptionHandlerAdvice.java similarity index 96% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/ExceptionHandlerAdvice.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/exception/ExceptionHandlerAdvice.java index f1b13c67..637d87a8 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/ExceptionHandlerAdvice.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/exception/ExceptionHandlerAdvice.java @@ -1,6 +1,5 @@ -package com.inbobwetrust.relay; +package com.inbobwetrust.exception; -import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; import org.springframework.context.support.DefaultMessageSourceResolvable; import org.springframework.http.HttpStatus; @@ -9,6 +8,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.support.WebExchangeBindException; +import java.util.stream.Collectors; + @ControllerAdvice @Slf4j public class ExceptionHandlerAdvice { diff --git a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/RelayRepository.java b/delivery-relay-service/src/main/java/com/inbobwetrust/repository/RelayRepository.java similarity index 66% rename from delivery-relay-service/src/main/java/com/inbobwetrust/relay/RelayRepository.java rename to delivery-relay-service/src/main/java/com/inbobwetrust/repository/RelayRepository.java index d0732094..44c6f8c1 100644 --- a/delivery-relay-service/src/main/java/com/inbobwetrust/relay/RelayRepository.java +++ b/delivery-relay-service/src/main/java/com/inbobwetrust/repository/RelayRepository.java @@ -1,6 +1,6 @@ -package com.inbobwetrust.relay; +package com.inbobwetrust.repository; -import com.inbobwetrust.relay.domain.RelayRequest; +import com.inbobwetrust.domain.RelayRequest; import org.springframework.data.repository.reactive.ReactiveCrudRepository; public interface RelayRepository extends ReactiveCrudRepository {} diff --git a/delivery-relay-service/src/test/java/com/inbobwetrust/relay/HealthCheckControllerTest.java b/delivery-relay-service/src/test/java/com/inbobwetrust/relay/HealthCheckControllerTest.java index 10e7ed76..efca8fa5 100644 --- a/delivery-relay-service/src/test/java/com/inbobwetrust/relay/HealthCheckControllerTest.java +++ b/delivery-relay-service/src/test/java/com/inbobwetrust/relay/HealthCheckControllerTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; +import com.inbobwetrust.controller.HealthCheckController; import groovy.util.logging.Slf4j; import java.util.Objects; import org.junit.jupiter.api.DisplayName; diff --git a/delivery-relay-service/src/test/java/com/inbobwetrust/relay/RelayControllerTest.java b/delivery-relay-service/src/test/java/com/inbobwetrust/relay/RelayControllerTest.java index b076edb7..f9dff04f 100644 --- a/delivery-relay-service/src/test/java/com/inbobwetrust/relay/RelayControllerTest.java +++ b/delivery-relay-service/src/test/java/com/inbobwetrust/relay/RelayControllerTest.java @@ -3,12 +3,15 @@ import static org.mockito.Mockito.any; import static org.mockito.Mockito.when; -import com.inbobwetrust.relay.domain.Delivery; -import com.inbobwetrust.relay.domain.DeliveryStatus; -import com.inbobwetrust.relay.domain.ReceiverType; -import com.inbobwetrust.relay.domain.RelayRequest; +import com.inbobwetrust.controller.RelayController; +import com.inbobwetrust.domain.Delivery; +import com.inbobwetrust.domain.DeliveryStatus; +import com.inbobwetrust.domain.ReceiverType; +import com.inbobwetrust.domain.RelayRequest; import java.time.LocalDateTime; import java.util.stream.Stream; + +import com.inbobwetrust.repository.RelayRepository; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; @@ -30,7 +33,8 @@ class RelayControllerTest { @Autowired WebTestClient testClient; - @MockBean RelayRepository relayRepository; + @MockBean + RelayRepository relayRepository; private final String BASE_URL = "/relay/v1";