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

leisure.springboot.web.swagger.SwaggerManager Maven / Gradle / Ivy

The newest version!
package leisure.springboot.web.swagger;

import leisure.springboot.core.BeanFactory;
import org.apache.commons.lang3.StringUtils;
import org.springframework.core.env.Environment;

public class SwaggerManager {

    private static Environment environment = BeanFactory.getApplicationContext().getEnvironment();

    public static boolean isEnableSwagger() {
        String cusConfig = environment.getProperty("leisure.swagger.enable");
        if (!StringUtils.isBlank(cusConfig) && !Boolean.parseBoolean(cusConfig)) {
            return false;
        }
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy