spring-framework / org.springframework.context.support / BeanDefinitionDsl / environment

environment

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.

Parameters

condition - the predicate to fulfill in order to take in account the inner bean definition block