SlideShare a Scribd company logo
JPA
Covenant Ko
Chapter 3
JPA
Entity Mapping / Hexagonal Architecture
- Name. Covenant Ko
- Company. 11번가
- Github 용감한친구들 Organization Founder & Maintainer. https://github.com/brave-people
- Github. https://github.com/KoEonYack
- Tech Blog. https://covenant.tistory.com/ (누적 방문 41만)
Q&A
https://www.javaguides.net/2018/12/jpa-entitymanager-interface-with-example.html
1. !
1. !
2. DB !
1. !
2. DB !
3. ORM !
1. !
2. DB !
3. ORM !
4. !
1. !
2. DB !
3. ORM !
4. !
5. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
7. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
7. !
Week 1
Week 2
Week 2
Week 3
Clean Clean Architecture !
https://youtu.be/IHrZD3vxYB0
https://subscription.packtpub.com/book/programming/9781839211966/1
Clean Architecture
UI
Presenter
Use case
Entity
Repository
Data source
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
Clean Architecture
UI
Presenter
Use case
Entity
Repository
Data source
Data Flow
Clean Architecture
UI
Presenter
Use case
Entity
Repository
Data source
Dependency Role
1.
2.
https://ko.wikipedia.org/wiki/%EC%84%9C%EC%9A%B8%EC%8A%A4%ED%80%98%EC%96%B4
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Core
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Core
1. Domain (with business rules) is the most important Layer.
2. Shouldn’t have any dependencies with other layers.
3. Domain Layer does NOT depend on Data Layer.
Clean Architecture
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
Clean Architecture
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
View Presenter
Use case
Entity Repository
Clean Architecture
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
View Presenter
Use case
Entity Repository
1. Single Responsibility Principle
2. Dependency Inversion Principle
View Presenter
Use case
Entity Repository
Hexagonal Architecture
Hexagonal Architecture
1. Core entity, use case
2.
3. 1:1
3. Core .
4. (
)
https://engineering.linecorp.com/ko/blog/port-and-adapter-architecture/
Hexagonal Architecture
RPC
HTTP API
Command Line
MySQL
Oracle
H2
1. Core entity, use case
2.
3. 1:1
3. Core .
4. (
)
Hexagonal Architecture
RPC
HTTP API
Command Line
MySQL
Oracle
H2
1. Core entity, use case
2.
3. 1:1
3. Core .
4. (
)
Spring Data JPA
Package by feature
Controller A
Data Access A Data Access B
Presentation layer
Business layer
Data Layer
Service A Service B
Controller B
Package by layer
https://engineering.linecorp.com/ko/blog/port-and-adapter-architecture/
.
.
Package by layer
https://engineering.linecorp.com/ko/blog/port-and-adapter-architecture/
1.
2.
Package by component
https://github.com/hyewonKim24/OntactOfficial
.
.
https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/#inversion-of-control
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
Hexagonal Architecture Code
Ports are used by external components to call our application
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
Ports are used by external components to call our application
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
Service to tie all the pieces together and drive the execution
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
Service to tie all the pieces together and drive the execution
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Example Code
https://github.com/thombergs/buckpal
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Sample Code
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
https://techblog.woowahan.com/5143/
Case Study
https://techblog.woowahan.com/5143/
Case Study
https://techblog.woowahan.com/5143/
Case Study
https://resources.experfy.com/bigdata-cloud/another-story-about-microservices-hexagonal-architecture/
Case Study
https://resources.experfy.com/bigdata-cloud/another-story-about-microservices-hexagonal-architecture/
Case Study
https://aws.amazon.com/ko/blogs/compute/developing-evolutionary-architecture-with-aws-lambda/
Case Study
Case Study
API Gateway
https://docs.microsoft.com/ko-kr/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
Case Study
API Gateway
https://docs.microsoft.com/ko-kr/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/#inversion-of-control
Summary
JPA
Covenant Ko
Chapter 3
JPA
Entity Mapping / Hexagonal Architecture

More Related Content

What's hot (20)

PPTX
Azure data platform overview
James Serra
 
PDF
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
OpenStack Korea Community
 
PPTX
Mongodb basics and architecture
Bishal Khanal
 
PDF
Red Hat OpenShift Container Platform Overview
James Falkner
 
PDF
PostgreSQL High Availability in a Containerized World
Jignesh Shah
 
PDF
Kubernetes a comprehensive overview
Gabriel Carro
 
PPTX
Azure Database Services for MySQL PostgreSQL and MariaDB
Nicholas Vossburg
 
PPTX
The Case for Chaos
Bruce Wong
 
PDF
OpenSearch.pdf
Abhi Jain
 
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
PPTX
서비스 지향 아키텍쳐 (SOA)
Terry Cho
 
PPTX
Introduction to MongoDB.pptx
Surya937648
 
PDF
Intro To MongoDB
Alex Sharp
 
PDF
MongoDB Fundamentals
MongoDB
 
PDF
Hexagonal architecture for java applications
Fabricio Epaminondas
 
PPTX
Introduction to Redis
Maarten Smeets
 
PDF
Architectures for open and scalable clouds
Randy Bias
 
PPTX
Hadoop Architecture
Dr. C.V. Suresh Babu
 
PDF
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
OpenStack Korea Community
 
PPTX
Docker 사내교육 자료
Juneyoung Oh
 
Azure data platform overview
James Serra
 
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
OpenStack Korea Community
 
Mongodb basics and architecture
Bishal Khanal
 
Red Hat OpenShift Container Platform Overview
James Falkner
 
PostgreSQL High Availability in a Containerized World
Jignesh Shah
 
Kubernetes a comprehensive overview
Gabriel Carro
 
Azure Database Services for MySQL PostgreSQL and MariaDB
Nicholas Vossburg
 
The Case for Chaos
Bruce Wong
 
OpenSearch.pdf
Abhi Jain
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
서비스 지향 아키텍쳐 (SOA)
Terry Cho
 
Introduction to MongoDB.pptx
Surya937648
 
Intro To MongoDB
Alex Sharp
 
MongoDB Fundamentals
MongoDB
 
Hexagonal architecture for java applications
Fabricio Epaminondas
 
Introduction to Redis
Maarten Smeets
 
Architectures for open and scalable clouds
Randy Bias
 
Hadoop Architecture
Dr. C.V. Suresh Babu
 
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
OpenStack Korea Community
 
Docker 사내교육 자료
Juneyoung Oh
 

Similar to JPA Week3 Entity Mapping / Hexagonal Architecture (13)

PPTX
Hexagonal architecture with Spring Boot
Mikalai Alimenkou
 
PDF
Dependency inversion using ports and adapters
Mahfuzul Haque
 
PDF
Hexagonal architecture: how, why and when
Xoubaman
 
PDF
JPA 스터디 Week2 - Object Relational Mapping
Covenant Ko
 
PDF
A very simple hexagonal architecture.pdf
Dan MAGIER
 
PPTX
Building multi tenancy enterprise applications - quick
uEngine Solutions
 
PDF
Db Explorer
Roland Sonnenschein
 
PDF
ljug-meetup-2023-03-hexagonal-architecture.pdf
Comsysto Reply GmbH
 
PDF
Hexagonal Architecture.pdf
VladimirRadzivil
 
PDF
Hexagonal architecture in PHP
Paulo Victor Gomes
 
PDF
Introduction to hexagonal architecture
Manel Sellés
 
PDF
Why Typescript with Clean Architecture
유진 정
 
PPTX
Hexagonal architecture with Spring Boot
Mikalai Alimenkou
 
Hexagonal architecture with Spring Boot
Mikalai Alimenkou
 
Dependency inversion using ports and adapters
Mahfuzul Haque
 
Hexagonal architecture: how, why and when
Xoubaman
 
JPA 스터디 Week2 - Object Relational Mapping
Covenant Ko
 
A very simple hexagonal architecture.pdf
Dan MAGIER
 
Building multi tenancy enterprise applications - quick
uEngine Solutions
 
Db Explorer
Roland Sonnenschein
 
ljug-meetup-2023-03-hexagonal-architecture.pdf
Comsysto Reply GmbH
 
Hexagonal Architecture.pdf
VladimirRadzivil
 
Hexagonal architecture in PHP
Paulo Victor Gomes
 
Introduction to hexagonal architecture
Manel Sellés
 
Why Typescript with Clean Architecture
유진 정
 
Hexagonal architecture with Spring Boot
Mikalai Alimenkou
 
Ad

More from Covenant Ko (20)

PDF
정원사를 마치며: 100일간의 병아리 개발자의 성장 이야기
Covenant Ko
 
PDF
왜 개발자는 컴퓨터공학을 공부해야 할까? (비전공자는 컴퓨터공학 과목에서 무엇을 알아야할까?)
Covenant Ko
 
PDF
JPA Week5. Join Fetch
Covenant Ko
 
PDF
JPA Week4. VALUE TYPES / CQRS
Covenant Ko
 
PDF
GREAT STEP 2. TDD & MockMVC
Covenant Ko
 
PDF
GREAT STEP 1. 테스트 코드를 향한 위대한 발걸음
Covenant Ko
 
PDF
JPA 스터디 Week1 - 하이버네이트, 캐시
Covenant Ko
 
PDF
떠먹는 '오브젝트' Ch07 객체 분해
Covenant Ko
 
PDF
떠먹는 '오브젝트' Ch05 책임 할당하기
Covenant Ko
 
PDF
[로켓 자바] Part 1 성능 튜닝 마인드 확립
Covenant Ko
 
PDF
떠먹는 '오브젝트' Ch04 설계 품질과 트레이드오프
Covenant Ko
 
PDF
떠먹는 '오브젝트' Ch03 역할, 책임, 협력
Covenant Ko
 
PDF
Week7 bean life cycle
Covenant Ko
 
PDF
떠먹는 '오브젝트' Ch02 객체지향 프로그래밍
Covenant Ko
 
PDF
Week6 autowired beanlifecycle
Covenant Ko
 
PDF
Week5 컴포넌트 스캔
Covenant Ko
 
PDF
Week4 빈은 전설이다. (싱글톤 빈, CGlib)
Covenant Ko
 
PDF
Week3 아주 작은 빈 이야기 2
Covenant Ko
 
PDF
Week2 아주 작은 빈 이야기
Covenant Ko
 
PDF
Week1 스프링이 사랑한 SOLID
Covenant Ko
 
정원사를 마치며: 100일간의 병아리 개발자의 성장 이야기
Covenant Ko
 
왜 개발자는 컴퓨터공학을 공부해야 할까? (비전공자는 컴퓨터공학 과목에서 무엇을 알아야할까?)
Covenant Ko
 
JPA Week5. Join Fetch
Covenant Ko
 
JPA Week4. VALUE TYPES / CQRS
Covenant Ko
 
GREAT STEP 2. TDD & MockMVC
Covenant Ko
 
GREAT STEP 1. 테스트 코드를 향한 위대한 발걸음
Covenant Ko
 
JPA 스터디 Week1 - 하이버네이트, 캐시
Covenant Ko
 
떠먹는 '오브젝트' Ch07 객체 분해
Covenant Ko
 
떠먹는 '오브젝트' Ch05 책임 할당하기
Covenant Ko
 
[로켓 자바] Part 1 성능 튜닝 마인드 확립
Covenant Ko
 
떠먹는 '오브젝트' Ch04 설계 품질과 트레이드오프
Covenant Ko
 
떠먹는 '오브젝트' Ch03 역할, 책임, 협력
Covenant Ko
 
Week7 bean life cycle
Covenant Ko
 
떠먹는 '오브젝트' Ch02 객체지향 프로그래밍
Covenant Ko
 
Week6 autowired beanlifecycle
Covenant Ko
 
Week5 컴포넌트 스캔
Covenant Ko
 
Week4 빈은 전설이다. (싱글톤 빈, CGlib)
Covenant Ko
 
Week3 아주 작은 빈 이야기 2
Covenant Ko
 
Week2 아주 작은 빈 이야기
Covenant Ko
 
Week1 스프링이 사랑한 SOLID
Covenant Ko
 
Ad

Recently uploaded (20)

PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
July Patch Tuesday
Ivanti
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 

JPA Week3 Entity Mapping / Hexagonal Architecture