Files
eapim-admin/CLAUDE.md
T
2025-11-14 15:01:12 +09:00

7.1 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

eLink EMS (eLink Management System) is a web-based management service for eLink that provides configuration, monitoring, and statistics features. This is a Spring-based Java web application deployed on Tomcat or WebLogic.

Key Features

  • User and permission management
  • Transaction log viewing (online/batch/bulk)
  • Statistics and dashboard monitoring
  • Interface, layout, adapter, and routing management
  • Integration with external systems (UMS, EAI batch)

Build and Development Commands

Build Commands

# Standard build
gradle build

# Build for Weblogic deployment (excludes tests)
gradle build -x test -Pprofile=weblogic

# Build WAR file
gradle war

# Clean build
gradle clean build

Running Tests

# Run all tests
gradle test

# Run specific test (use JUnit platform)
gradle test --tests "com.eactive.eai.rms.*"

Development Setup

The application is configured via environment-specific properties files in WebContent/WEB-INF/properties/:

  • env.D.properties - Development
  • env.T.properties - Test/Staging
  • env.P.properties - Production

Local Development (Tomcat) Set the following JVM options:

-Deai.datasource.type=DEV
-Dinst.Name=emsSvr99
-Deai.tableowner=EMSADM
-Deai.systemmode=D
-Dfile.encoding=utf-8
-Dlogin.mode=db
-DLOGBACK_LOG_LEVEL=DEBUG
-Dlogback.configurationFile=classpath:logback-dev.xml
-Dhibernate.dialect=org.hibernate.dialect.Oracle12cDialect
-Dkjb_safedb.mode=fake

Profile Configuration

  • -Pprofile=weblogic: Uses weblogic-web.xml instead of web.xml (resolves DefaultServlet issues)

Architecture and Code Structure

Multi-Module Project

This project references several external eLink modules defined in settings.gradle:

  • elink-online-core - Core interfaces and classes
  • elink-online-transformer - Message transformation logic
  • elink-online-adapter - Communication adapters
  • elink-online-common - Common utilities
  • elink-online-emsclient - EMS communication client
  • elink-portal-common - Portal shared components
  • kjb-safedb - KJB bank-specific database encryption
  • eapim-admin-kjb - KJB bank-specific customizations

These modules are located in sibling directories (../eapim-online/, ../elink-portal-common/, etc.)

Package Structure

com.eactive.eai
├── agent/command        - Command pattern implementations
├── common              - Common utilities, iBatis, JSON serialization
├── custom              - Customer-specific customizations
├── rms                 - Main application code
│   ├── bap             - Batch processing (BAP)
│   │   ├── adaptor     - Batch adapters
│   │   ├── manage      - Batch management (messages, servers, properties)
│   │   └── tansaction  - Batch transaction tracking
│   ├── bat             - Additional batch functionality
│   ├── common          - RMS common (filters, startup, services)
│   ├── data            - Data entities, repositories
│   ├── env             - Environment configuration
│   ├── kakao           - Kakao integration
│   ├── onl             - Online transaction management
│   │   ├── apim        - API management (portal org, users, approvals)
│   │   ├── manage      - Resource management
│   │   └── transaction - Transaction handling
│   └── service         - Business services
└── ext.kjb             - Kwangju Bank (KJB) extensions

Technology Stack

  • Framework: Spring 5.3.27 (MVC, Data JPA)
  • Persistence:
    • Hibernate 5.6.15 (JPA/ORM)
    • iBatis 2.3.4 (legacy SQL mapping)
    • QueryDSL 5.0.0 (type-safe queries)
  • Database: Oracle 12c (primary), with support for MariaDB/PostgreSQL
  • Logging: Logback 1.2.10 (with SLF4J)
  • Build: Gradle 8.x with Java 8
  • View: JSP with JSTL
  • Other: Quartz scheduler, EhCache, Jackson, Lombok, MapStruct

Spring Configuration

  • Root context: WebContent/WEB-INF/applicationContext.xml
  • Servlet context: WebContent/WEB-INF/springapp-servlet.xml
  • Environment-specific configs loaded based on ${eai.systemmode} system property
  • Component scanning enabled with annotation-based configuration

Data Access Patterns

The application uses dual persistence:

  1. JPA/Hibernate - For newer entity-based code in com.eactive.eai.rms.data.entity
  2. iBatis - For legacy SQL mappings in src/main/resources/com/eactive/eai/**/*.xml

Repositories use Spring Data JPA conventions, Services use @Service, Controllers use @RestController/@Controller.

Key Initialization

  • AppInitializer - Main application startup bean that sets system properties
  • CustomizingAppInitializer - Customer-specific initialization
  • System properties: inst.Name, eai.tableowner, eai.systemmode, theme.color

KJB (Kwangju Bank) Specific Configuration

Property Management

KJB-specific properties are stored in database table TSEAIRM24 with group name 'Monitoring'. Key properties handled by com.eactive.ext.kjb.common.KjbProperty:

Email Notification (via EAI Batch)

UMS (SMS/LMS/KakaoTalk) Integration

  • kjb.ums.host_url - UMS API endpoint
  • kjb.ums.api_key - UMS API authentication key
  • kjb.ums.connection_timeout - Connection timeout in seconds
  • kjb.ums.response_timeout - Response timeout in seconds

Security

  • Custom password encoder: KjbSafedbPasswordEncoder for SafeDB integration
  • Set -Dkjb_safedb.mode=fake for local development without SafeDB

Database Vendor Support

The application supports multiple databases via vendor-specific SQL mapping files:

  • Oracle: *-oracle.xml
  • MariaDB: *-mariadb.xml
  • PostgreSQL: *-postgresql.xml

Database vendor is configured in properties files via db.vendor and hibernate.dialect.

WAR Deployment

The WAR file is built as eapim-admin.war with context path /monitoring.

Weblogic Deployment: Use -Pprofile=weblogic to include weblogic-web.xml configuration.

Important Notes

  • Encoding: System uses UTF-8. CharacterEncodingFilter applies UTF-8 to all requests except *.excel patterns.
  • XSS Protection: CrossScriptingFilter applied to all requests via com.eactive.eai.rms.common.filter.CrossScriptingFilter
  • Real-time Updates: All management changes are reflected immediately in both DB and memory
  • Instance Name: Each deployment must have unique inst.Name for clustering
  • Table Owner: Oracle schema owner specified via eai.tableowner property