All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dehuckakpyt.telegrambot.config.SourceJpaInitializingConfig.kt Maven / Gradle / Ivy

There is a newer version: 0.11.2
Show newest version
package io.github.dehuckakpyt.telegrambot.config

import io.github.dehuckakpyt.telegrambot.config.constant.PropertiesConstant.TELEGRAM_BOT_SOURCE_JPA
import io.github.dehuckakpyt.telegrambot.transaction.action.TransactionAction
import io.github.dehuckakpyt.telegrambot.transaction.action.TransactionActionImpl
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.annotation.Bean
import org.springframework.transaction.PlatformTransactionManager


/**
 * Created on 08.07.2024.
 *
 * @author Denis Matytsin
 */
@ConditionalOnProperty(name = [TELEGRAM_BOT_SOURCE_JPA], havingValue = "true", matchIfMissing = true)
class SourceJpaInitializingConfig {

    @Bean
    fun transactionAction(
        transactionManager: PlatformTransactionManager,
    ): TransactionAction =
        TransactionActionImpl(transactionManager)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy