refactor: restructure MCP tools without Controller layer, using UseCase pattern per Glow standards
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package io.shinhanlife.dap.mcc.converter;
|
||||
package io.shinhanlife.dap.mcc.biz.sms.converter;
|
||||
|
||||
|
||||
/**
|
||||
@@ -15,8 +15,8 @@ package io.shinhanlife.dap.mcc.converter;
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
import io.shinhanlife.dap.mcc.dto.SmsSendRequest;
|
||||
import io.shinhanlife.dap.mcc.legacy.SmsLegacyRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.SmsSendRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.legacy.SmsLegacyRequest;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.shinhanlife.dap.mcc.dto;
|
||||
package io.shinhanlife.dap.mcc.biz.sms.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.shinhanlife.dap.mcc.legacy;
|
||||
package io.shinhanlife.dap.mcc.biz.sms.legacy;
|
||||
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.shinhanlife.dap.mcc.biz.sms.usecase;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.*;
|
||||
|
||||
public interface SmsToolUseCase {
|
||||
Object sendSms(SmsSendRequest req);
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package io.shinhanlife.dap.mcc.service.impl;
|
||||
package io.shinhanlife.dap.mcc.biz.sms.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.lib.annotation.McpTool;
|
||||
import io.shinhanlife.dap.mcc.service.SmsToolService;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.usecase.SmsToolUseCase;
|
||||
import io.shinhanlife.dap.mcc.service.AbstractMcpToolService;
|
||||
import io.shinhanlife.dap.mcc.converter.SmsLegacyConverter;
|
||||
import io.shinhanlife.dap.mcc.dto.SmsSendRequest;
|
||||
import io.shinhanlife.dap.mcc.legacy.SmsLegacyRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.converter.SmsLegacyConverter;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.dto.SmsSendRequest;
|
||||
import io.shinhanlife.dap.mcc.biz.sms.legacy.SmsLegacyRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@McpTool(routingType = "EAI", categoryKey = "notification")
|
||||
public class SmsToolServiceImpl extends AbstractMcpToolService implements SmsToolService {
|
||||
public class SmsToolUseCaseImpl extends AbstractMcpToolService implements SmsToolUseCase {
|
||||
|
||||
private final SmsLegacyConverter converter;
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.service;
|
||||
|
||||
import io.shinhanlife.dap.mcc.dto.*;
|
||||
|
||||
public interface SmsToolService {
|
||||
Object sendSms(SmsSendRequest req);
|
||||
}
|
||||
@@ -20,8 +20,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = {"io.shinhanlife.dap.mcc", "io.shinhanlife.dap.lib.adapter", "io.shinhanlife.dap.lib.mcp", "io.shinhanlife.dap.lib.config", "io.shinhanlife.dap.lib.integration"})
|
||||
@ConfigurationPropertiesScan(basePackages = {"io.shinhanlife.dap.mcc", "io.shinhanlife.dap.lib.adapter", "io.shinhanlife.dap.lib.mcp", "io.shinhanlife.dap.lib.config", "io.shinhanlife.dap.lib.integration"})
|
||||
@SpringBootApplication(scanBasePackages = {"io.shinhanlife.dap.mcc", "io.shinhanlife.dap.common.adapter", "io.shinhanlife.dap.common.mcp", "io.shinhanlife.dap.common.config", "io.shinhanlife.dap.common.integration"})
|
||||
@ConfigurationPropertiesScan(basePackages = {"io.shinhanlife.dap.mcc", "io.shinhanlife.dap.common.adapter", "io.shinhanlife.dap.common.mcp", "io.shinhanlife.dap.common.config", "io.shinhanlife.dap.common.integration"})
|
||||
@EnableCaching
|
||||
public class DapToolSmsApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user