# Egovframe Compatibility

> Use when reviewing or writing eGovFrame 4.x or 5.x Java code — Controller, Service, DAO, configuration, or library usage. Covers inheritance requirements, forbidden call patterns, and architecture constraints. Assumes Spring Framework knowledge.

- **Type:** Skill
- **Install:** `agentstack add skill-composite-korean-skills-egovframe-compatibility`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [composite](https://agentstack.voostack.com/s/composite)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [composite](https://github.com/composite)
- **Source:** https://github.com/composite/korean-skills/tree/jumo/skills/egovframe-compatibility

## Install

```sh
agentstack add skill-composite-korean-skills-egovframe-compatibility
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# eGovFrame Compatibility Rules

## Overview

eGovFrame 4.x/5.x adds constraints on top of Spring conventions for government system development. Only eGovFrame-specific rules are documented here — Spring Framework knowledge assumed.

**Scope:** Java projects using `org.egovframe.rte.*` (eGovFrame 4.x+). Excludes `egovframework.rte.*` (3.10 and earlier), non-Java code, and frontend concerns.

---

## Controller Layer

**Target:** `@Controller`, `@RestController`, and Servlet code only when Spring MVC is impractical and justified.

**Rules:**
1. Map handlers with Spring MVC annotations.
2. Do not inject or call DAO classes directly, including subclasses of `SqlMapClientDaoSupport`, `SqlSessionDaoSupport`, and `HibernateDaoSupport`.
3. No direct NoSQL, MQ, or cache access from controllers.
4. Route business logic through an injected service interface.

```java
// ✅ Correct
@Controller
@RequestMapping("/sample")
public class SampleController {
    @Autowired
    private SampleService sampleService;

    @GetMapping("/list")
    public String list(Model model) {
        model.addAttribute("list", sampleService.selectList());
        return "sample/list";
    }
}

// ❌ DAO injected directly — forbidden
@Controller
public class SampleController {
    @Autowired
    private SampleMapper sampleMapper; // ❌ inject Service, not DAO
}

// ❌ Business logic handled inside controller — forbidden
@GetMapping("/calc")
public String calc(Model model) {
    int result = heavyBusinessCalculation(); // ❌ delegate to Service
    model.addAttribute("result", result);
    return "sample/result";
}
```

---

## Service Layer

**Target:** `@Service` or `@Component` business classes, excluding tests.

**Rules:**
1. Each service implementation must extend `EgovAbstractServiceImpl`, directly or through a base class.
2. Each service implementation must implement a dedicated service interface.

**Why the interface matters:** eGovFrame AOP relies on Java Dynamic Proxy, not CGLIB — class-only services cannot be proxied.

```java
// ✅ Correct — interface + implementation pair
public interface SampleService {
    List selectList(SampleVO vo) throws Exception;
}

@Service("sampleService")
public class SampleServiceImpl extends EgovAbstractServiceImpl implements SampleService {
    @Autowired
    private SampleMapper sampleMapper;

    @Override
    public List selectList(SampleVO vo) throws Exception {
        return sampleMapper.selectList(vo);
    }
}

// ❌ No interface — Java Proxy cannot proxy a class-only service
@Service
public class SampleService extends EgovAbstractServiceImpl { }

// ❌ Missing EgovAbstractServiceImpl
@Service
public class SampleServiceImpl implements SampleService { }
```

---

## DAO / Data Access Layer

**Target:** `@Repository` classes and mapper/repository code.

| Technology | Required pattern |
|------------|------------------|
| iBatis | `extends EgovAbstractDAO` |
| MyBatis class mapper | `extends EgovAbstractMapper` |
| MyBatis interface mapper | `@Mapper` plus eGovFrame `MapperConfigurer` |
| JPA | `extends JpaRepository`, `CrudRepository`, or `PagingAndSortingRepository` |
| JPA alternative | Inject `HibernateTemplate` or `EntityManager` directly or via a base class |

**Forbidden:** Direct calls to `insert`, `delete`, `update`, `select`, or `list` on `SqlMapClientDaoSupport` or `SqlSessionDaoSupport`.

```java
// ✅ MyBatis class mapper
@Repository
public class SampleMapper extends EgovAbstractMapper {
    public List selectList(SampleVO vo) {
        return selectList("sample.selectList", vo);
    }
}

// ✅ MyBatis interface mapper
@Mapper
public interface SampleMapper {
    List selectList(SampleVO vo);
}

// ✅ JPA
public interface SampleRepository extends JpaRepository {
    List findByStatus(String status);
}

// ❌ Direct SqlSessionDaoSupport call — forbidden
@Repository
public class SampleDAO extends SqlSessionDaoSupport {
    public List selectList(SampleVO vo) {
        return getSqlSession().selectList("sample.selectList", vo); // ❌
    }
}
```

---

## Configuration Layer

**Target:** XML config plus equivalent Java Config or Spring Boot config.

**Required inclusions:**
- Transaction handling via AOP config (`` plus ``) or `@Transactional`
- A connection pool such as DBCP or HikariCP

```xml

    
        
    

    
    

```

```java
// ✅ Java Config
@Configuration
@EnableTransactionManagement
public class AppConfig {
    @Bean
    public DataSource dataSource() {
        return new HikariDataSource();
    }
}
```

```xml

```

---

## Library and Extension Rules

**Required libraries:** use the same version for all of these:

```text
org.egovframe.rte.ptl.mvc-[version].jar
org.egovframe.rte.fdl.cmmn-[version].jar
org.egovframe.rte.psl.dataaccess-[version].jar
org.egovframe.rte.fdl.logging-[version].jar
```

**Library rules:**
- Do not modify `org.egovframe.rte.*` JARs — MD5/SHA1 must match original distribution.
- Do not change Spring Framework or Spring Boot versions through transitive deps, except for a justified patch upgrade.

**Extension rules:** if extending an eGovFrame RTE class:

```java
// ❌ Forbidden package
package org.egovframe.rte.custom; // ❌ must not define classes inside rte packages
public class MyDAO extends EgovAbstractDAO { }

// ❌ Forbidden naming
public class EgovCustomDAO extends EgovAbstractDAO { } // ❌ must not start with "Egov"

// ✅ Correct extension
package com.example.common.dao;
public class CommonDAO extends EgovAbstractDAO { }
```

---

## Overall Application Rules

- Keep the request path as `Controller → Service → DAO`; do not skip layers.
- Every project must contain all three layers, with service interface/implementation pairs.

**Package layout** — choose one and apply consistently across the entire project:

```
// ✅ Domain-first (applied consistently)
com.example.sample.controller.SampleController
com.example.sample.service.SampleService
com.example.sample.dao.SampleMapper

// ✅ Layer-first (applied consistently)
com.example.controller.sample.SampleController
com.example.service.sample.SampleService
com.example.dao.sample.SampleMapper

// ❌ Mixed layout — forbidden
com.example.sample.controller.SampleController   // domain-first
com.example.service.other.OtherService           // layer-first (mixed)
```

**Naming convention** — choose one and apply consistently:

```java
// ✅ Business-code style (applied consistently)
AA0011Controller, AA0011ServiceImpl, AA0011Mapper

// ✅ Word style (applied consistently)
MemberController, MemberServiceImpl, MemberMapper

// ❌ Mixed styles — forbidden
AA0011Controller    // business-code style
MemberServiceImpl   // word style (mixed)
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [composite](https://github.com/composite)
- **Source:** [composite/korean-skills](https://github.com/composite/korean-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-composite-korean-skills-egovframe-compatibility
- Seller: https://agentstack.voostack.com/s/composite
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
