chore: acquire-core migration monorepo (legacy C + Spring Boot target skeleton)
Some checks failed
ci / build (push) Failing after 2s

TxCore/ECPG legacy 매입·정산 C 슬라이스(빌드검증) + Spring Boot 멀티모듈 골격(mvn test green) + MIGRATION.md 전환룰 + CI(boot 빌드).
This commit is contained in:
forge-bot 2026-07-18 09:55:46 +00:00
commit ff0b0b60a2
31 changed files with 2208 additions and 0 deletions

View file

@ -0,0 +1,24 @@
package com.klaro.acquirecore.framework;
import org.springframework.stereotype.Component;
/**
* 레거시 {@code msg_layout.h} 고정길이 전문(電文) 코덱의 Spring 자리표시자.
*
* <p> 전환에서는 고정길이(positional) 바이트 레이아웃 DTO 바인딩을 담당한다
* (BeanIO 또는 커스텀 코덱). 지금은 스켈레톤이 빈으로 뜨는지만 증명한다.
*/
@Component
public class MessageCodec {
/** 고정길이 필드를 우측을 공백으로 채워 정규화한다 (자리표시자 구현). */
public String padRight(String value, int width) {
if (value == null) {
value = "";
}
if (value.length() >= width) {
return value.substring(0, width);
}
return String.format("%-" + width + "s", value);
}
}

View file

@ -0,0 +1,31 @@
package com.klaro.acquirecore.framework;
import java.util.HashMap;
import java.util.Map;
/**
* 레거시 TxCore {@code TXBUF} (고정 슬롯 / 버퍼) Spring 대체 자리표시자.
*
* <p> 전환에서는 요청/응답 DTO(record) 정형 필드를 담고, 컨텍스트는
* 서비스 체인({@code tx_call}) 전달되는 느슨한 / 상태만 보관한다.
*/
public final class TxContext {
private final Map<String, Object> slots = new HashMap<>();
/** TXBUF 필드 설정 (레거시 {@code Fchg} 상당). */
public TxContext put(String key, Object value) {
slots.put(key, value);
return this;
}
/** TXBUF 필드 조회 (레거시 {@code Fget} 상당). */
public Object get(String key) {
return slots.get(key);
}
/** 적재된 슬롯 개수. */
public int size() {
return slots.size();
}
}

View file

@ -0,0 +1,12 @@
/**
* TxCore 공통 프레임워크의 Spring 대체 계층.
*
* <p>레거시 {@code framework/txcore/} (in-process 서비스 디스패처 + 고정 슬롯 TXBUF +
* XA 스텁) Spring 관용구로 이식한 자리표시자 스타터다. 실제 전환 서비스
* 레지스트리는 {@code ApplicationContext} 조회로, {@code tx_call} 내부
* 호출/Feign 으로, {@code tx_begin/commit} {@code @Transactional} 대체된다.
*
* @see com.klaro.acquirecore.framework.TxContext
* @see com.klaro.acquirecore.framework.MessageCodec
*/
package com.klaro.acquirecore.framework;