diff --git a/src/main/kotlin/com/hero/alignlab/event/listener/GroupEventListener.kt b/src/main/kotlin/com/hero/alignlab/event/listener/GroupEventListener.kt index 97b12e9..7ce83c5 100644 --- a/src/main/kotlin/com/hero/alignlab/event/listener/GroupEventListener.kt +++ b/src/main/kotlin/com/hero/alignlab/event/listener/GroupEventListener.kt @@ -3,6 +3,7 @@ package com.hero.alignlab.event.listener import com.hero.alignlab.domain.group.application.GroupUserService import com.hero.alignlab.event.model.CreateGroupEvent import io.github.oshai.kotlinlogging.KotlinLogging +import jakarta.transaction.Transactional import org.springframework.stereotype.Component import org.springframework.transaction.event.TransactionalEventListener @@ -12,6 +13,7 @@ class GroupEventListener( ) { private val logger = KotlinLogging.logger { } + @Transactional(value = Transactional.TxType.REQUIRES_NEW) @TransactionalEventListener fun handle(event: CreateGroupEvent) { groupUserService.saveSync(event.group.id, event.group.ownerUid)