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

leisure.springboot.authorization.AuthorizationManager Maven / Gradle / Ivy

package leisure.springboot.authorization;

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

public class AuthorizationManager {
    private static Environment environment = BeanFactory.getApplicationContext().getEnvironment();

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy