s2.spring.automate.persister.SpringEventPublisher.kt Maven / Gradle / Ivy
The newest version!
package s2.spring.automate.persister
import org.springframework.context.ApplicationEventPublisher
import org.springframework.context.PayloadApplicationEvent
import org.springframework.stereotype.Component
import s2.automate.core.appevent.publisher.AppEventPublisher
@Component
class SpringEventPublisher(
private val applicationEventPublisher: ApplicationEventPublisher,
) : AppEventPublisher {
override fun publish(event: EVENT & Any) {
applicationEventPublisher.publishEvent(PayloadApplicationEvent(this, event))
}
}