inline fun <reified T : Any> DeclarativeBeanConfiguration.lazyInstantiatedBean(name: String? = null, noinline definition: BeansProvider.() -> T): Unit
Adds a BeanDefinition for a SingletonScopedFactoryBean that produces a bean with the given definition, optionally with the specified name.
Since beans are singletons by default, this has the effect of a lazy instantiation.
name - the bean's name (optional)
definition - the definition to construct the bean
Parameters