
org.openl.spring.config.ConditionalOnEnable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.openl.spring Show documentation
Show all versions of org.openl.spring Show documentation
Common components for Spring integration
The newest version!
package org.openl.spring.config;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.context.annotation.Conditional;
/**
* Enables bean registration when all properties not "false" and not empty. For example in
* {@code @ConditionalOnEnable({"feature.enabled", "feature.module.enabled", "feature.param"}) }
* bean registration will be when the following properties are defined:
*
*
* feature.enabled=true
* feature.module.enabled=true
* feature.param=10
*
*
* @author Yury Molchan
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(EnableCondition.class)
public @interface ConditionalOnEnable {
/**
* The set of properties to check.
*/
String[] value();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy