registerBean

inline fun <T : Any> registerBean(name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false)

Register a bean from the given bean class, which will be instantiated using the related resolvable constructor if any.

Parameters

T

the bean type

name

the name of the bean

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any> registerBean(autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false): String

Register a bean from the given bean class, which will be instantiated using the related resolvable constructor if any.

Return

the generated bean name

Parameters

T

the bean type

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope


inline fun <T : Any> registerBean(name: String, autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false, crossinline supplier: BeanRegistrarDsl.SupplierContextDsl<T>.() -> T)

Register a bean from the given bean class, which will be instantiated using the provided supplier.

Parameters

T

the bean type

name

the name of the bean

autowirable

set whether this bean is a candidate for getting autowired into some other bean

backgroundInit

set whether this bean allows for instantiation on a background thread

description

a human-readable description of this bean

fallback

set whether this bean is a fallback autowire candidate

infrastructure

set whether this bean has an infrastructure role, meaning it has no relevance to the end-user

lazyInit

set whether this bean is lazily initialized

order

the sort order of this bean

primary

set whether this bean is a primary autowire candidate

prototype

set whether this bean has a prototype scope

supplier

the supplier to construct a bean instance


inline fun <T : Any> registerBean(autowirable: Boolean = true, backgroundInit: Boolean = false, description: String? = null, fallback: Boolean = false, infrastructure: Boolean = false, lazyInit: Boolean = false, order: Int? = null, primary: Boolean = false, prototype: Boolean = false, crossinline supplier: BeanRegistrarDsl.SupplierContextDsl<T>.() -> T): String