All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lodsve.core.condition.ConditionalOnProperty Maven / Gradle / Ivy

There is a newer version: 2.7.5-RELEASE
Show newest version
package lodsve.core.condition;

import org.springframework.context.annotation.Conditional;

import java.lang.annotation.*;

/**
 * conditional property是否匹配给定的值.
 *
 * @author sunhao(sunhao.java @ gmail.com)
 * @version 1.0 2016/12/8 下午5:55
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(OnPropertyCondition.class)
public @interface ConditionalOnProperty {
    /**
     * relaxed bind class name
     *
     * @return relaxed bind class name
     */
    Class clazz() default Object.class;

    /**
     * properties的key
     *
     * @return key
     */
    String key();

    /**
     * properties的value
     *
     * @return value
     */
    String value();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy