com.github.zhujk.resp.autoconfigure.RespAutoConfiguration.kt Maven / Gradle / Ivy
package com.github.zhujk.resp.autoconfigure
import com.github.zhujk.resp.converter.DefaultRespConverter
import com.github.zhujk.resp.converter.RespConverter
import com.github.zhujk.resp.props.RespProperties
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan("com.github.zhujk.resp")
@EnableConfigurationProperties(RespProperties::class)
@ConditionalOnProperty("resp.enabled", havingValue = "true", matchIfMissing = true)
class RespAutoConfiguration {
@Bean
@ConditionalOnMissingBean
fun respConverter(): RespConverter<*> = DefaultRespConverter()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy