LCF 공통 프레임워크 매핑 규칙 정의 (BAIS-SPRING-ARC-002)
Some checks are pending
ci / test (push) Waiting to run

This commit is contained in:
forge-bot 2026-07-10 13:30:44 +00:00
parent 784f647693
commit 94f5802531

View file

@ -0,0 +1,40 @@
package com.example.lcf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;
public class LcfMappingRules {
private static final Logger logger = LoggerFactory.getLogger(LcfMappingRules.class);
public void lcfTry(Runnable action) {
try {
action.run();
} catch (Exception e) {
lcfSetErr(e);
}
}
public void lcfSetErr(Exception e) {
logger.error("Error occurred: ", e);
// 추가적인 에러 처리 로직
}
public void lcfLog(String message) {
logger.info(message);
}
@Transactional
public void batchCommit(Runnable batchAction) {
try {
batchAction.run();
} catch (Exception e) {
// 롤백 처리
throw e;
}
}
public double performDecimalOperation(double a, double b) {
return a + b; // 예시로 덧셈을 수행
}
}