> For the complete documentation index, see [llms.txt](https://dodeon.gitbook.io/study/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dodeon.gitbook.io/study/kimyounghan-spring-boot-and-jpa-development/03-architecture.md).

# 애플리케이션 아키텍처

## 계층형 구조

![](/files/-Ma3SYreCDzs-jzy683m)

* controller, web
  * 웹 계층
* service
  * 비즈니스 로직, 트랜잭션 처리
* repository
  * JPA를 직접 사용하는 계층
  * EntityManager 사용
* domain
  * Entity가 모여있는 계층
  * 모든 계층에서 사용

controller도 repository에 직접 접근할 수 있되 방향은 단방향으로 흐르도록 작업할 예정이다.

## 패키지 구조

* jpabook.jpashop
  * domain
  * exception
  * repository
  * service
  * web

## 개발 순서

1. service, repository 계층을 개발
2. 테스트 케이스 작성 및 검증
3. 웹 계층 개발


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://dodeon.gitbook.io/study/kimyounghan-spring-boot-and-jpa-development/03-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
