open class BeanDefinitionDsl : ApplicationContextInitializer<GenericApplicationContext>
Class implementing functional bean definition Kotlin DSL.
enum class Autowire
Autowire enum constants. |
|
inner class BeanDefinitionContext
Provide read access to some application context facilities. |
|
enum class Scope
Scope enum constants. |
BeanDefinitionDsl(condition: (ConfigurableEnvironment) -> Boolean = { true })
Create a new bean definition DSL. |
fun <T : Any> bean(name: String? = null, scope: Scope? = null, isLazyInit: Boolean? = null, isPrimary: Boolean? = null, autowireMode: Autowire = Autowire.CONSTRUCTOR, isAutowireCandidate: Boolean? = null): Unit
Declare a bean definition from the given bean class which can be inferred when possible. fun <T : Any> bean(name: String? = null, scope: Scope? = null, isLazyInit: Boolean? = null, isPrimary: Boolean? = null, autowireMode: Autowire = Autowire.NO, isAutowireCandidate: Boolean? = null, function: BeanDefinitionContext.() -> T): Unit
Declare a bean definition using the given supplier for obtaining a new instance. |
|
fun environment(condition: ConfigurableEnvironment.() -> Boolean, init: BeanDefinitionDsl.() -> Unit): BeanDefinitionDsl
Take in account bean definitions enclosed in the provided lambda only when the specified environment-based predicate is true. |
|
open fun initialize(context: GenericApplicationContext): Unit
Register the bean defined via the DSL on the provided application context. |
|
fun profile(profile: String, init: BeanDefinitionDsl.() -> Unit): BeanDefinitionDsl
Take in account bean definitions enclosed in the provided lambda only when the specified profile is active. |