✨ 주요 기능: - 배치 설정 관리 (생성/수정/삭제/실행) - 배치 실행 로그 관리 및 모니터링 - 배치 스케줄러 자동 실행 (cron 기반) - 외부 DB 연결을 통한 데이터 동기화 - Oracle, MSSQL, MariaDB 커넥터 지원 🔧 백엔드 구현: - BatchManagementController: 배치 설정 CRUD - BatchExecutionLogController: 실행 로그 관리 - BatchSchedulerService: 자동 스케줄링 - BatchExternalDbService: 외부 DB 연동 - 배치 관련 테이블 스키마 추가 🎨 프론트엔드 구현: - 배치 관리 대시보드 UI - 배치 생성/수정 폼 - 실행 로그 모니터링 화면 - 수동 실행 및 상태 관리 🛡️ 안전성: - 기존 시스템과 독립적 구현 - 트랜잭션 기반 안전한 데이터 처리 - 에러 핸들링 및 로깅 강화
70 lines
2.0 KiB
TypeScript
70 lines
2.0 KiB
TypeScript
// 배치관리 라우트
|
|
// 작성일: 2024-12-24
|
|
|
|
import { Router } from "express";
|
|
import { BatchController } from "../controllers/batchController";
|
|
import { authenticateToken } from "../middleware/authMiddleware";
|
|
|
|
const router = Router();
|
|
|
|
/**
|
|
* GET /api/batch-configs
|
|
* 배치 설정 목록 조회
|
|
*/
|
|
router.get("/", authenticateToken, BatchController.getBatchConfigs);
|
|
|
|
/**
|
|
* GET /api/batch-configs/connections
|
|
* 사용 가능한 커넥션 목록 조회
|
|
*/
|
|
router.get("/connections", BatchController.getAvailableConnections);
|
|
|
|
/**
|
|
* GET /api/batch-configs/connections/:type/tables
|
|
* 내부 DB 테이블 목록 조회
|
|
*/
|
|
router.get("/connections/:type/tables", authenticateToken, BatchController.getTablesFromConnection);
|
|
|
|
/**
|
|
* GET /api/batch-configs/connections/:type/:id/tables
|
|
* 외부 DB 테이블 목록 조회
|
|
*/
|
|
router.get("/connections/:type/:id/tables", authenticateToken, BatchController.getTablesFromConnection);
|
|
|
|
/**
|
|
* GET /api/batch-configs/connections/:type/tables/:tableName/columns
|
|
* 내부 DB 테이블 컬럼 정보 조회
|
|
*/
|
|
router.get("/connections/:type/tables/:tableName/columns", authenticateToken, BatchController.getTableColumns);
|
|
|
|
/**
|
|
* GET /api/batch-configs/connections/:type/:id/tables/:tableName/columns
|
|
* 외부 DB 테이블 컬럼 정보 조회
|
|
*/
|
|
router.get("/connections/:type/:id/tables/:tableName/columns", authenticateToken, BatchController.getTableColumns);
|
|
|
|
/**
|
|
* GET /api/batch-configs/:id
|
|
* 특정 배치 설정 조회
|
|
*/
|
|
router.get("/:id", authenticateToken, BatchController.getBatchConfigById);
|
|
|
|
/**
|
|
* POST /api/batch-configs
|
|
* 배치 설정 생성
|
|
*/
|
|
router.post("/", authenticateToken, BatchController.createBatchConfig);
|
|
|
|
/**
|
|
* PUT /api/batch-configs/:id
|
|
* 배치 설정 수정
|
|
*/
|
|
router.put("/:id", authenticateToken, BatchController.updateBatchConfig);
|
|
|
|
/**
|
|
* DELETE /api/batch-configs/:id
|
|
* 배치 설정 삭제 (논리 삭제)
|
|
*/
|
|
router.delete("/:id", authenticateToken, BatchController.deleteBatchConfig);
|
|
|
|
export default router; |