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

net.guerlab.spring.swagger2.autoconfigure.SwaggerEnableCondition Maven / Gradle / Ivy

There is a newer version: 2.1.5
Show newest version
package net.guerlab.spring.swagger2.autoconfigure;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * swagger启用判断
 * 
 * @author guer
 *
 */
public class SwaggerEnableCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return context.getEnvironment().getProperty("swagger.enable", Boolean.TYPE, false);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy