충전이벤트가 적용되지 않는 버그 수정
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
package kr.co.vividnext.sodalive.can.charge.event
|
package kr.co.vividnext.sodalive.can.charge.event
|
||||||
|
|
||||||
import kr.co.vividnext.sodalive.member.Member
|
import kr.co.vividnext.sodalive.member.Member
|
||||||
|
import org.springframework.context.event.EventListener
|
||||||
import org.springframework.scheduling.annotation.Async
|
import org.springframework.scheduling.annotation.Async
|
||||||
import org.springframework.stereotype.Component
|
import org.springframework.stereotype.Component
|
||||||
import org.springframework.transaction.annotation.Propagation
|
import org.springframework.transaction.annotation.Propagation
|
||||||
import org.springframework.transaction.annotation.Transactional
|
import org.springframework.transaction.annotation.Transactional
|
||||||
import org.springframework.transaction.event.TransactionalEventListener
|
|
||||||
|
|
||||||
class ChargeSpringEvent(
|
class ChargeSpringEvent(
|
||||||
val chargeId: Long,
|
val chargeId: Long,
|
||||||
@@ -17,7 +17,7 @@ class ChargeSpringEventListener(
|
|||||||
private val chargeEventService: ChargeEventService
|
private val chargeEventService: ChargeEventService
|
||||||
) {
|
) {
|
||||||
@Async
|
@Async
|
||||||
@TransactionalEventListener
|
@EventListener
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
fun applyChargeEvent(event: ChargeSpringEvent) {
|
fun applyChargeEvent(event: ChargeSpringEvent) {
|
||||||
chargeEventService.applyChargeEvent(event.chargeId, event.member.id!!)
|
chargeEventService.applyChargeEvent(event.chargeId, event.member.id!!)
|
||||||
|
Reference in New Issue
Block a user