Skip to content

Commit

Permalink
refactor: 도메인 단위로 패키지 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
This2sho committed Apr 5, 2024
1 parent 3dd63ca commit afe5c31
Show file tree
Hide file tree
Showing 165 changed files with 651 additions and 602 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.domain;
package com.parkingcomestrue;

import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking;
package com.parkingcomestrue;

import jakarta.annotation.PostConstruct;
import java.util.TimeZone;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.example.parking.auth;
package com.parkingcomestrue.auth;

import com.example.parking.auth.authcode.AuthCodeCategory;
import com.example.parking.auth.authcode.AuthCodePlatform;
import com.example.parking.auth.authcode.application.AuthCodeValidator;
import com.example.parking.auth.authcode.application.dto.AuthCodeCertificateRequest;
import com.example.parking.auth.authcode.application.dto.AuthCodeRequest;
import com.example.parking.auth.authcode.event.AuthCodeCreateEvent;
import com.example.parking.auth.authcode.util.AuthCodeKeyConverter;
import com.example.parking.auth.session.MemberSession;
import com.example.parking.auth.session.MemberSessionRepository;
import com.example.parking.support.exception.ClientException;
import com.example.parking.support.exception.ExceptionInformation;
import com.example.parking.util.authcode.AuthCodeGenerator;
import com.parkingcomestrue.auth.authcode.AuthCodeCategory;
import com.parkingcomestrue.auth.authcode.AuthCodePlatform;
import com.parkingcomestrue.auth.authcode.application.AuthCodeValidator;
import com.parkingcomestrue.auth.authcode.application.dto.AuthCodeCertificateRequest;
import com.parkingcomestrue.auth.authcode.application.dto.AuthCodeRequest;
import com.parkingcomestrue.auth.authcode.event.AuthCodeCreateEvent;
import com.parkingcomestrue.auth.authcode.util.AuthCodeKeyConverter;
import com.parkingcomestrue.auth.session.MemberSession;
import com.parkingcomestrue.auth.session.MemberSessionRepository;
import com.parkingcomestrue.support.exception.ClientException;
import com.parkingcomestrue.support.exception.ExceptionInformation;
import com.parkingcomestrue.util.authcode.AuthCodeGenerator;
import java.time.LocalDateTime;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode;
package com.parkingcomestrue.auth.authcode;

import java.util.Arrays;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode;
package com.parkingcomestrue.auth.authcode;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode;
package com.parkingcomestrue.auth.authcode;

public class InValidAuthCodeException extends RuntimeException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.parking.auth.authcode.api;
package com.parkingcomestrue.auth.authcode.api;

import com.example.parking.auth.AuthService;
import com.example.parking.auth.authcode.application.dto.AuthCodeCertificateRequest;
import com.example.parking.auth.authcode.application.dto.AuthCodeRequest;
import com.example.parking.auth.authcode.application.dto.AuthCodeResponse;
import com.parkingcomestrue.auth.AuthService;
import com.parkingcomestrue.auth.authcode.application.dto.AuthCodeCertificateRequest;
import com.parkingcomestrue.auth.authcode.application.dto.AuthCodeRequest;
import com.parkingcomestrue.auth.authcode.application.dto.AuthCodeResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.parking.auth.authcode.application;
package com.parkingcomestrue.auth.authcode.application;


import com.example.parking.auth.authcode.event.AuthCodeCreateEvent;
import com.example.parking.auth.authcode.infrastructure.AuthCodeSender;
import com.example.parking.auth.authcode.util.AuthCodeKeyConverter;
import com.parkingcomestrue.auth.authcode.event.AuthCodeCreateEvent;
import com.parkingcomestrue.auth.authcode.infrastructure.AuthCodeSender;
import com.parkingcomestrue.auth.authcode.util.AuthCodeKeyConverter;
import java.time.Instant;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.parking.auth.authcode.application;
package com.parkingcomestrue.auth.authcode.application;

import com.example.parking.auth.authcode.AuthCodePlatform;
import com.example.parking.auth.authcode.InValidAuthCodeException;
import com.parkingcomestrue.auth.authcode.AuthCodePlatform;
import com.parkingcomestrue.auth.authcode.InValidAuthCodeException;
import java.util.EnumMap;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.application;
package com.parkingcomestrue.auth.authcode.application;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.application;
package com.parkingcomestrue.auth.authcode.application;

public interface PlatformValidator {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.application.dto;
package com.parkingcomestrue.auth.authcode.application.dto;


import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.application.dto;
package com.parkingcomestrue.auth.authcode.application.dto;

import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.application.dto;
package com.parkingcomestrue.auth.authcode.application.dto;

import lombok.Getter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.event;
package com.parkingcomestrue.auth.authcode.event;

import lombok.Getter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.infrastructure;
package com.parkingcomestrue.auth.authcode.infrastructure;

public interface AuthCodeSender {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.infrastructure;
package com.parkingcomestrue.auth.authcode.infrastructure;

import lombok.RequiredArgsConstructor;
import org.springframework.mail.SimpleMailMessage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.authcode.util;
package com.parkingcomestrue.auth.authcode.util;

import java.util.StringJoiner;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.session;
package com.parkingcomestrue.auth.session;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.auth.session;
package com.parkingcomestrue.auth.session;

import java.time.LocalDateTime;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.config;
package com.parkingcomestrue.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.web.client.RestTemplateBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.config;
package com.parkingcomestrue.config;

import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.parking.config;
package com.parkingcomestrue.config;

import com.example.parking.external.coordinate.CoordinateErrorHandler;
import com.parkingcomestrue.external.coordinate.CoordinateErrorHandler;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.config;
package com.parkingcomestrue.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.parking.config;
package com.parkingcomestrue.config;

import com.example.parking.config.argumentresolver.AuthArgumentResolver;
import com.example.parking.config.argumentresolver.parking.ParkingQueryArgumentResolver;
import com.example.parking.config.argumentresolver.parking.ParkingSearchConditionArgumentResolver;
import com.example.parking.config.interceptor.AuthInterceptor;
import com.parkingcomestrue.config.argumentresolver.AuthArgumentResolver;
import com.parkingcomestrue.config.argumentresolver.parking.ParkingQueryArgumentResolver;
import com.parkingcomestrue.config.argumentresolver.parking.ParkingSearchConditionArgumentResolver;
import com.parkingcomestrue.config.interceptor.AuthInterceptor;
import io.swagger.v3.oas.models.PathItem;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.parking.config.argumentresolver;
package com.parkingcomestrue.config.argumentresolver;

import com.example.parking.auth.AuthService;
import com.example.parking.auth.session.MemberSession;
import com.parkingcomestrue.auth.AuthService;
import com.parkingcomestrue.auth.session.MemberSession;
import lombok.RequiredArgsConstructor;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.config.argumentresolver;
package com.parkingcomestrue.config.argumentresolver;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.config.argumentresolver.parking;
package com.parkingcomestrue.config.argumentresolver.parking;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.parking.config.argumentresolver.parking;
package com.parkingcomestrue.config.argumentresolver.parking;

import com.example.parking.application.parking.dto.ParkingQueryRequest;
import com.parkingcomestrue.parking.application.dto.ParkingQueryRequest;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.support.WebDataBinderFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.config.argumentresolver.parking;
package com.parkingcomestrue.config.argumentresolver.parking;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.example.parking.config.argumentresolver.parking;
package com.parkingcomestrue.config.argumentresolver.parking;

import com.example.parking.application.SearchConditionMapper;
import com.example.parking.application.parking.dto.ParkingSearchConditionRequest;
import com.example.parking.domain.parking.OperationType;
import com.example.parking.domain.parking.ParkingType;
import com.example.parking.domain.parking.PayType;
import com.parkingcomestrue.searchcondition.application.SearchConditionMapper;
import com.parkingcomestrue.parking.application.dto.ParkingSearchConditionRequest;
import com.parkingcomestrue.parking.domain.OperationType;
import com.parkingcomestrue.parking.domain.ParkingType;
import com.parkingcomestrue.parking.domain.PayType;
import java.util.Arrays;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.parking.config.interceptor;
package com.parkingcomestrue.config.interceptor;

import com.example.parking.auth.AuthService;
import com.example.parking.auth.session.MemberSession;
import com.parkingcomestrue.auth.AuthService;
import com.parkingcomestrue.auth.session.MemberSession;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.external.config;
package com.parkingcomestrue.external.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.parking.external.coordinate;
package com.parkingcomestrue.external.coordinate;

import com.example.parking.support.exception.ClientException;
import com.example.parking.support.exception.ExceptionInformation;
import com.parkingcomestrue.support.exception.ClientException;
import com.parkingcomestrue.support.exception.ExceptionInformation;
import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.client.ClientHttpResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.example.parking.external.coordinate;
package com.parkingcomestrue.external.coordinate;

import com.example.parking.external.coordinate.dto.CoordinateResponse;
import com.example.parking.external.coordinate.dto.CoordinateResponse.ExactLocation;
import com.example.parking.domain.parking.Location;
import com.parkingcomestrue.external.coordinate.dto.CoordinateResponse;
import com.parkingcomestrue.parking.domain.Location;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down Expand Up @@ -32,12 +31,12 @@ public Location extractLocationByAddress(String address, Location location) {
return location;
}

ExactLocation exactLocation = getExactLocation(result);
CoordinateResponse.ExactLocation exactLocation = getExactLocation(result);
return Location.of(exactLocation.getLongitude(), exactLocation.getLatitude());
}

private ExactLocation getExactLocation(ResponseEntity<CoordinateResponse> result) {
List<ExactLocation> exactLocations = result.getBody().getExactLocations();
private CoordinateResponse.ExactLocation getExactLocation(ResponseEntity<CoordinateResponse> result) {
List<CoordinateResponse.ExactLocation> exactLocations = result.getBody().getExactLocations();
return exactLocations.get(0);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.external.coordinate.dto;
package com.parkingcomestrue.external.coordinate.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example.parking.external.parkingapi;
package com.parkingcomestrue.external.parkingapi;

import com.example.parking.domain.parking.Parking;
import com.parkingcomestrue.parking.domain.Parking;
import java.util.List;

public interface ParkingApiService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package com.example.parking.external.parkingapi.pusan;
package com.parkingcomestrue.external.parkingapi.pusan;

import static com.example.parking.external.parkingapi.pusan.PusanPublicParkingResponse.ParkingInfo.*;
import static com.parkingcomestrue.external.parkingapi.pusan.PusanPublicParkingResponse.ParkingInfo.*;

import com.example.parking.domain.parking.BaseInformation;
import com.example.parking.domain.parking.Fee;
import com.example.parking.domain.parking.FeePolicy;
import com.example.parking.domain.parking.FreeOperatingTime;
import com.example.parking.domain.parking.Location;
import com.example.parking.domain.parking.OperatingTime;
import com.example.parking.domain.parking.OperationType;
import com.example.parking.domain.parking.Parking;
import com.example.parking.domain.parking.ParkingType;
import com.example.parking.domain.parking.PayTypes;
import com.example.parking.domain.parking.Space;
import com.example.parking.domain.parking.TimeInfo;
import com.example.parking.domain.parking.TimeUnit;
import com.parkingcomestrue.parking.domain.BaseInformation;
import com.parkingcomestrue.parking.domain.Fee;
import com.parkingcomestrue.parking.domain.FeePolicy;
import com.parkingcomestrue.parking.domain.FreeOperatingTime;
import com.parkingcomestrue.parking.domain.Location;
import com.parkingcomestrue.parking.domain.OperatingTime;
import com.parkingcomestrue.parking.domain.OperationType;
import com.parkingcomestrue.parking.domain.Parking;
import com.parkingcomestrue.parking.domain.ParkingType;
import com.parkingcomestrue.parking.domain.PayTypes;
import com.parkingcomestrue.parking.domain.Space;
import com.parkingcomestrue.parking.domain.TimeInfo;
import com.parkingcomestrue.parking.domain.TimeUnit;
import java.time.DateTimeException;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.parking.external.parkingapi.pusan;
package com.parkingcomestrue.external.parkingapi.pusan;

import com.example.parking.domain.parking.Parking;
import com.example.parking.external.parkingapi.ParkingApiService;
import com.parkingcomestrue.parking.domain.Parking;
import com.parkingcomestrue.external.parkingapi.ParkingApiService;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.parking.external.parkingapi.pusan;
package com.parkingcomestrue.external.parkingapi.pusan;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
Expand Down
Loading

0 comments on commit afe5c31

Please sign in to comment.