# 프로젝트 구조 표준 정의서

다양한 X2BEE 프로젝트와 하위 패키지들의 구조를 파악하는 데 필요한 핵심 정보를 제공합니다.

프로젝트 개발이 보다 효율적으로 작업될 수 있도록 지원하기 위해 각 프로젝트와 패키지 명칭과 설명 그리고 구조에 대해 상세히 설명하고 있습니다.

***

## Application Service 구성도 <a href="#application-service" id="application-service"></a>

<figure><img src="/files/LGBI6kUavKKIgGEbF5Oa" alt=""><figcaption></figcaption></figure>

## 프로젝트 명칭 및 설명 <a href="#undefined" id="undefined"></a>

<table><thead><tr><th width="203">프로젝트명</th><th>설명</th></tr></thead><tbody><tr><td>x2bee-fo</td><td>Store Front 프로그램 프로젝트(Mobile, PC 구분없이 반응형으로 개발)</td></tr><tr><td>x2bee-gw</td><td>Store Front 프로그램 api gateway</td></tr><tr><td>x2bee-api-member</td><td>고객 프로그램 api 프로젝트</td></tr><tr><td>x2bee-api-order</td><td>주문 프로그램 api 프로젝트</td></tr><tr><td>x2bee-api-goods</td><td>상품 프로그램 api 프로젝트</td></tr><tr><td>x2bee-api-display</td><td>전시 프로그램 api 프로젝트</td></tr><tr><td>x2bee-api-event</td><td>이벤트 프로그램 api 프로젝트</td></tr><tr><td>x2bee-api-bo</td><td>관리자/고객센터 프로그램 용 api 프로젝트</td></tr><tr><td>x2bee-api-common</td><td>공통 프로그램 api 프로젝트</td></tr><tr><td>x2bee-bo</td><td>관리자 BackOffice Front 프로젝트(Mobile, PC 구분없이 반응형으로 개발)</td></tr><tr><td>x2bee-batch-mbod</td><td>회원/주문 배치 프로그램 프로젝트</td></tr><tr><td>x2bee-batch-gddp</td><td>상품/전시 배치 프로그램 프로젝트</td></tr><tr><td>x2bee-common</td><td><p>공통클래스 프로젝트</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>이 프로젝트는 기본 클래스와 공용 유틸리티 클래스 등을 포함하며, 엔터티/DTO 클래스는 각각의 개별 프로젝트에서 관리됩니다.</p></div></td></tr><tr><td>x2bee-nest-search</td><td>검색엔진 프로젝트</td></tr></tbody></table>

## 프로젝트 패키지 구조 <a href="#undefined" id="undefined"></a>

### x2bee-common <a href="#x2bee-common" id="x2bee-common"></a>

* 프레임워크 공통 클래스 패키지 : 프로젝트 공통 클래스, 유틸 클래스, 커스텀 어노테이션, 예외처리, DB관련 속성, 보안 등 포함
* API 관련 비즈니스 로직 클래스 패키지 : Controller, Service, Dao, Entity, repository 클래스
* 프레임워크 관련 로직 클래스 패키지 : advice, aop, config, security 클래스
* 설정 관련 로직 클래스 패키지 : X2beeApiApplication, pom.xml 등 프로젝트 관련 설정 클래스

| /src/main/java    | 자바 소스                             |                               |
| ----------------- | --------------------------------- | ----------------------------- |
|                   | com.x2bee.common                  | 패키지 네임스페이스                    |
|                   | base                              | base                          |
|                   | advice                            | global responseBodyAdvice 클래스 |
| annotation        | 어노테이션 정의                          |                               |
| aop               | 사이트, mybatis, db 설정 aop           |                               |
| bizmessages       | ncp message 전송 클래스                |                               |
| constant          | 상수정의                              |                               |
| context           | Spring application context 편의 클래스 |                               |
| encrypt           | 암복호화 처리 클래스                       |                               |
| entity            | 공통 엔티티 Bean                       |                               |
| exception         | exception 정의                      |                               |
| filter            | servlet request filter 클래스        |                               |
| formatter         | datatype format Convert 클래스       |                               |
| interceptor       | Controller Interceptor 클래스        |                               |
| mail              | mail 전송 클래스                       |                               |
| masking           | masking 처리 관련 클래스                 |                               |
| messageconverter  | json message convert 처리 클래스       |                               |
| mybatis           | mybatis 클래스                       |                               |
| properties        | properties 처리 클래스                 |                               |
| propertyeditor    | Grid String to Timestamp 클래스      |                               |
| redis             | redis 클래스                         |                               |
| rest              | rest api 호출을 위한 편의 클래스            |                               |
| routingdatasource | routingDataSource 클래스             |                               |
| service           | 불용어 처리 클래스                        |                               |
| token             | 인증토큰 처리 클래스                       |                               |
| tree              | list를 tree 변환 클래스                 |                               |
| upload            | 파일 업로드 클래스                        |                               |
| util              | 편의 클래스 정의                         |                               |
| xss               | xss 처리 클래스                        |                               |

&#x20;

### x2bee-api.{msa명}  <a href="#x2bee-api.-msa" id="x2bee-api.-msa"></a>

* java 폴더 구조

| /src/main/java | 자바 소스                              |                              |
| -------------- | ---------------------------------- | ---------------------------- |
|                | com.x2bee.api.{msa}                | 패키지 네임스페이스                   |
|                | base                               | 공통                           |
|                | advice                             | Spring controller advice 클래스 |
| aop            | 서비스 공통 aspect 설정 클래스               |                              |
| config         | Spring config bean, security 설정    |                              |
| filter         | Spring Filter 클래스                  |                              |
| utils          | 편의 클래스 정의                          |                              |
| app            | 어플리케이션 클래스                         |                              |
|                | controller                         | @Controller                  |
|                | 모듈명                                | 각 모듈 별 @Controller           |
| service        | @Service                           |                              |
|                | 모듈명                                | 각 모듈 별 @Service              |
| repository     | @Repository (\* Mybatis Mapper 이용) |                              |
|                | {dbname}rodb                       | Read Only DB Repository      |
|                | 모듈명                                | 각 모듈 별 @Repository           |
| {dbname}rwdb   | Read Write Repository              |                              |
|                | 모듈명                                | 각 모듈 별 @Repository           |
| dto            | 파라미터/응답데이터/DB조회데이터용 dto 정의         |                              |
|                | request                            | 요청 dto 정의                    |
|                | 모듈명                                | 각 모듈 별 dto                   |
| response       | 응답 dto 정의                          |                              |
|                | 모듈명                                | 각 모듈 별 dto                   |
| entity         | DB 등록/수정/삭제용 entity Bean 정의        |                              |
| constant       | 상수정의                               |                              |
| enums          | enum 파일                            |                              |

* resource 폴더 구조

| /src/main/resource |                                    |                                    |
| ------------------ | ---------------------------------- | ---------------------------------- |
|                    | config                             | {MSA} 설정 파일                        |
| mapper             | Mybatis Mapper (.xml) 파일           |                                    |
|                    | {dbname}rodb                       | Read Only (Replica) Database 쿼리 파일 |
|                    | 모듈명                                | 모듈별 mapper 파일                      |
| {dbname}rwdb       | Read Write (Master) Database 쿼리 파일 |                                    |
|                    | 모듈명                                | 모듈별 mapper 파일                      |
| templates          |                                    |                                    |
|                    | email                              | Email Html 템플릿 파일(Api Common 프로젝트) |
| message            | 다국어 처리 메시지 정의 파일                   |                                    |
|                    | 모듈명                                | 모듈별 message 파일                     |

### x2bee-api-bo  <a href="#x2bee-api-bo" id="x2bee-api-bo"></a>

* java 폴더 구조

| /src/main/java | 자바 소스                              |                               |
| -------------- | ---------------------------------- | ----------------------------- |
|                | com.x2bee.bo.api                   | 패키지 네임스페이스                    |
|                | base                               | 공통                            |
|                | advice                             | Spring controller advice 클래스  |
| annotation     | 어노테이션 정의                           |                               |
| aop            | 서비스 공통 aspect 설정 클래스               |                               |
| config         | Spring config bean, security 설정    |                               |
| decorator      | TaskDecorator 클래스                  |                               |
| filter         | Spring Filter 클래스                  |                               |
| interceptor    | Controller Interceptor 클래스         |                               |
| masking        | masking 처리 관련 클래스                  |                               |
| properties     | properties 처리 클래스                  |                               |
| repository     | 공통 Code Repository                 |                               |
| util           | 편의 클래스 정의                          |                               |
| app            | 어플리케이션 클래스                         |                               |
|                | controller                         | @Controller                   |
|                | 모듈명                                | 각 모듈 별 @Controller            |
| service        | @Service                           |                               |
|                | 모듈명                                | 각 모듈 별 @Service               |
| repository     | @Repository (\* Mybatis Mapper 이용) |                               |
|                | orderrodb                          | 회원/주문 DB Read Only Repository |
|                | 모듈명                                | 각 모듈 별 @Repository            |
| orderrwdb      | 회원/주문 DB Read Write Repository     |                               |
|                | 모듈명                                | 각 모듈 별 @Repository            |
| displayrodb    | 상품/전시 DB Read Only Repository      |                               |
|                | 모듈명                                | 각 모듈 별 @Repository            |
| displayrwdb    | 상품/전시 DB Read Write Repository     |                               |
|                | 모듈명                                | 각 모듈 별 @Repository            |
| eventrodb      | 이벤트 DB Read Only Repository        |                               |
|                | 모듈명                                | 각 모듈 별 @Repository            |
| eventrwdb      | 이벤트 DB Read Write Repository       |                               |
|                | 모듈명                                | 각 모듈 별 @Repository            |
| dto            | 요청파라미터/응답데이터/DB조회데이터용 dto 정의       |                               |
|                | request                            | 요청 dto 정의                     |
|                | 모듈명                                | 각 모듈 별 dto                    |
| response       | 응답 dto 정의                          |                               |
|                | 모듈명                                | 각 모듈 별 dto                    |
| entity         | DB 등록/수정/삭제용 entity Bean 정의        |                               |
| constant       | 상수정의                               |                               |
| enums          | enum 파일                            |                               |

* resource 폴더 구조

| /src/main/resource                                                               |                                          |                                    |
| -------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------- |
|                                                                                  | config                                   | 설정 파일                              |
| mapper                                                                           | Mybatis Mapper (.xml) 파일                 |                                    |
| <p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p> | orderrodb                                | 회원/주문 DB Read Only (Replica) 쿼리 파일 |
|                                                                                  | 모듈명                                      | 모듈별 mapper 파일                      |
| orderrwdb                                                                        | 회원/주문 Read Write (Master) Database 쿼리 파일 |                                    |
|                                                                                  | 모듈명                                      | 모듈별 mapper 파일                      |
| displayrodb                                                                      | 상품/전시 DB Read Only (Replica) 쿼리 파일       |                                    |
|                                                                                  | 모듈별 mapper 파일                            | 모듈별 mapper 파일                      |
| displayrwdb                                                                      | 상품/전시 DB Read Write (Master) 쿼리 파일       |                                    |
|                                                                                  | 모듈별 mapper 파일                            | 모듈별 mapper 파일                      |
| eventrodb                                                                        | 이벤트 DB Read Only (Replica) 쿼리 파일         |                                    |
|                                                                                  | 모듈별 mapper 파일                            | 모듈별 mapper 파일                      |
| eventrwdb                                                                        | 이벤트 DB Read Write (Master) 쿼리 파일         |                                    |
|                                                                                  | 모듈별 mapper 파일                            | 모듈별 mapper 파일                      |
| message                                                                          | 다국어 처리 메시지 정의 파일                         |                                    |
|                                                                                  | 모듈명                                      | 모듈별 message 파일                     |

&#x20;

### x2bee-batch-mbod/x2bee-batch-gddp  <a href="#x2bee-batch-mbod-x2bee-batch-gddp" id="x2bee-batch-mbod-x2bee-batch-gddp"></a>

* java 폴더 구조

| /src/main/java | 자바 소스                              |                         |
| -------------- | ---------------------------------- | ----------------------- |
|                | com.x2bee.batch                    | 패키지 네임스페이스              |
|                | base                               | 공통                      |
|                | aop                                | 서비스 공통 aspect 설정 클래스    |
| config         | Spring config bean 설정              |                         |
| context        | Context Holder 클래스                 |                         |
| listener       | Batch listener 설                   |                         |
| redismessage   | redis 설                            |                         |
| util           | 편의 클래스 정의                          |                         |
| app            | 어플리케이션 클래스                         |                         |
|                | controller                         | @Controller             |
|                | 모듈명                                | 각 모듈 별 @Controller      |
| jobconfig      | 배치잡 정의                             |                         |
|                | 각 모듈 별 배치잡                         | 각 모듈 별 배치잡              |
| service        | @Service                           |                         |
|                | 모듈명                                | 각 모듈 별 @Service         |
| repository     | @Repository (\* Mybatis Mapper 이용) |                         |
|                | {dbname}rodb                       | Read Only DB Repository |
|                | 모듈명                                | 각 모듈 별 @Repository      |
| {dbname}rwdb   | Read Write Repository              |                         |
|                | 모듈명                                | 각 모듈 별 @Repository      |
| 모듈명            | 각 모듈 별 @Repository                 |                         |
| dto            | DB 조회 데이터용 dto 정의                  |                         |
|                | 모듈명                                | 각 모듈 별 dto 정의           |
| entity         | DB 등록/수정/삭제용 entity Bean 정의        |                         |
| constant       | 상수정의                               |                         |
| enums          | enum 파일                            |                         |

&#x20;

* resource 폴더 구조

| /src/main/resource |                                    |                              |
| ------------------ | ---------------------------------- | ---------------------------- |
|                    | config                             | 설정 파일                        |
| Mapper             | Mybatis Mapper (.xml) 파일           |                              |
|                    | {dbname}rodb                       | DB Read Only (Replica) 쿼리 파일 |
|                    | 모듈명                                | 모듈별 mapper 파일                |
| {dbname}rwdb       | Read Write (Master) Database 쿼리 파일 |                              |
|                    | 모듈명                                | 모듈별 mapper 파일                |
| message            | 다국어 처리 메시지 정의 파일                   |                              |
|                    | 모듈명                                | 모듈별 message 파일               |

&#x20;

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tech.x2bee.com/dev-guide/pjt-prepare/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
