본문 바로가기

du.study기록공간

검색하기
du.study기록공간
프로필사진 du.study

  • 분류 전체보기 (70)
    • 자바 (23)
    • 스프링 (31)
    • Tool (2)
    • presto (1)
    • DB (3)
    • JPA (5)
    • nginx (1)
    • kotlin (2)
    • 기타 잡다한 지식 (2)
Guestbook
Notice
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
  • ResponseBody
  • CompletableFuture
  • asyncconfigurer
  • java list
  • list
  • Spring Boot
  • wire type
  • map
  • HashMap
  • DeferredImportSelector
  • asynccustomautoconfiguration
  • spring MVC
  • SpringMVC
  • java lambda
  • micrometer tracing
  • java
  • traceasynccustomautoconfiguration
  • jpa
  • aws secretmanager
  • Spring JPA
  • grpc
  • Sleuth
  • EnableWebMvc
  • java.util.list
  • traceId
  • @FunctionalInterface
  • spring
  • kotlin
  • awssecretsmanagerpropertysources
  • elasticsearch
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록domain event (1)

du.study기록공간

JPA save() Domain Event 추가하기

JPA 를 사용하면서 save동작시, event를 등록하는 방법에 대해 기록하려합니다. 특정 entity가 저장이 될때, event호출을 통하여 특정 동작을 수행하게 할 수 있습니다. 코드로 간략하게 보면 다음과 같습니다. Event 코드 public class AccountEvent extends ApplicationEvent { private final Account account; public AccountEvent(Object source) { super(source); this.account = (Account) source; } public Account getAccount() { return account; } } Listener 코드 @Component public class Account..

JPA 2020. 12. 13. 21:22
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바