From 867e72160c157b6284d88ee661610862d163a25b Mon Sep 17 00:00:00 2001 From: KimBeomJin Date: Wed, 7 Sep 2022 22:12:22 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20(#38)=20UseCase=EC=97=90=20@Transactio?= =?UTF-8?q?n=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/comit/simtong/global/annotation/ReadOnlyUseCase.kt | 3 +++ .../kotlin/team/comit/simtong/global/annotation/UseCase.kt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/ReadOnlyUseCase.kt b/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/ReadOnlyUseCase.kt index 960a3e83..79ae31c7 100644 --- a/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/ReadOnlyUseCase.kt +++ b/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/ReadOnlyUseCase.kt @@ -1,5 +1,7 @@ package team.comit.simtong.global.annotation +import org.springframework.transaction.annotation.Transactional + /** * * 조회 기능을 담당하는 사용자 UseCase를 나타내는 어노테이션 @@ -10,4 +12,5 @@ package team.comit.simtong.global.annotation **/ @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.CLASS) +@Transactional(readOnly = true) annotation class ReadOnlyUseCase() diff --git a/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/UseCase.kt b/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/UseCase.kt index 84dd5e1f..1c653211 100644 --- a/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/UseCase.kt +++ b/simtong-application/src/main/kotlin/team/comit/simtong/global/annotation/UseCase.kt @@ -1,5 +1,7 @@ package team.comit.simtong.global.annotation +import org.springframework.transaction.annotation.Transactional + /** * * 추가, 수정, 삭제 기능을 담당하는 사용자 UseCase를 나타내는 어노테이션 @@ -10,4 +12,5 @@ package team.comit.simtong.global.annotation **/ @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.CLASS) +@Transactional annotation class UseCase()