|
|
|
@ -9,6 +9,8 @@ import com.vmis.interfaceapp.model.ledger.LedgerResponse;
|
|
|
|
import com.vmis.interfaceapp.service.RequestEnricher;
|
|
|
|
import com.vmis.interfaceapp.service.RequestEnricher;
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
@ -46,6 +48,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/api/v1/vehicles")
|
|
|
|
@RequestMapping("/api/v1/vehicles")
|
|
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
@Tag(name = "Vehicle Interfaces", description = "시군구연계 자동차 정보 연계 API")
|
|
|
|
@Tag(name = "Vehicle Interfaces", description = "시군구연계 자동차 정보 연계 API")
|
|
|
|
public class VehicleInterfaceController {
|
|
|
|
public class VehicleInterfaceController {
|
|
|
|
|
|
|
|
|
|
|
|
@ -68,25 +72,6 @@ public class VehicleInterfaceController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private final GovernmentApiClient govClient;
|
|
|
|
private final GovernmentApiClient govClient;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 생성자를 통한 의존성 주입
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* <p>Spring Framework의 생성자 주입 방식을 사용합니다.
|
|
|
|
|
|
|
|
* 이 방식은 다음과 같은 장점을 제공합니다:</p>
|
|
|
|
|
|
|
|
* <ul>
|
|
|
|
|
|
|
|
* <li>필수 의존성을 명확하게 표현</li>
|
|
|
|
|
|
|
|
* <li>불변성 보장 (final 필드 사용 가능)</li>
|
|
|
|
|
|
|
|
* <li>단위 테스트 시 Mock 객체 주입 용이</li>
|
|
|
|
|
|
|
|
* <li>순환 참조 방지</li>
|
|
|
|
|
|
|
|
* </ul>
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param govClient 정부 API와 통신하는 클라이언트 객체
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public VehicleInterfaceController(GovernmentApiClient govClient, RequestEnricher enricher) {
|
|
|
|
|
|
|
|
this.govClient = govClient;
|
|
|
|
|
|
|
|
this.enricher = enricher;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 자동차 기본사항 조회 API
|
|
|
|
* 자동차 기본사항 조회 API
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|