feat(core): setup MapStruct and add SampleMciMapper pilot implementation
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package io.shinhanlife.axhub.biz.mcp.sample.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@ToString
|
||||
public class SampleAiReqDto {
|
||||
/**
|
||||
* AI Agent가 전달하는 자연어 기반의 고객 식별자
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* AI Agent가 판별한 액션 유형
|
||||
*/
|
||||
private String actionType;
|
||||
|
||||
/**
|
||||
* AI Agent가 추출한 부가 정보
|
||||
*/
|
||||
private String extraInfo;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package io.shinhanlife.axhub.biz.mcp.sample.mapper;
|
||||
|
||||
import io.shinhanlife.axhub.biz.mcp.sample.dto.SampleAiReqDto;
|
||||
import io.shinhanlife.axhub.biz.mcp.sample.dto.SampleMciReqDto;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface SampleMciMapper {
|
||||
|
||||
/**
|
||||
* AI Agent의 DTO를 MCI 통신용 DTO로 변환합니다.
|
||||
* 필드명이 달라도 @Mapping 어노테이션으로 손쉽게 연결할 수 있습니다.
|
||||
*/
|
||||
@Mapping(source = "userId", target = "customerId")
|
||||
@Mapping(source = "actionType", target = "interfaceId")
|
||||
@Mapping(source = "extraInfo", target = "requestDetails")
|
||||
SampleMciReqDto toMciReq(SampleAiReqDto aiReq);
|
||||
}
|
||||
@@ -30,6 +30,8 @@ subprojects {
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.18.32'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
|
||||
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
@@ -37,4 +39,8 @@ subprojects {
|
||||
options.compilerArgs << '-parameters'
|
||||
options.compilerArgs << '-Amapstruct.defaultComponentModel=spring'
|
||||
}
|
||||
|
||||
tasks.withType(Test) {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user