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

org.zodiac.autoconfigure.bootstrap.AppPropertySourceBootstrapProperties Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.bootstrap;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.zodiac.commons.constants.SystemPropertiesConstants;

@ConfigurationProperties(prefix = SystemPropertiesConstants.Zodiac.SPRING_BOOTSTRAP_CONFIG_PREFIX)
public class AppPropertySourceBootstrapProperties {

    /**
     * Flag to indicate that the external properties should override system properties. Default true.
     */
    private boolean overrideSystemProperties = true;

    /**
     * Flag to indicate that {@link #isOverrideSystemProperties() systemPropertiesOverride} can be used. Set to false to
     * prevent users from changing the default accidentally. Default true.
     */
    private boolean allowOverride = true;

    /**
     * Flag to indicate that when {@link #setAllowOverride(boolean) allowOverride} is true, external properties should
     * take lowest priority and should not override any existing property sources (including local config files).
     * Default false.
     */
    private boolean overrideNone = false;

    public boolean isOverrideNone() {
        return this.overrideNone;
    }

    public AppPropertySourceBootstrapProperties setOverrideNone(boolean overrideNone) {
        this.overrideNone = overrideNone;
        return this;
    }

    public boolean isOverrideSystemProperties() {
        return this.overrideSystemProperties;
    }

    public AppPropertySourceBootstrapProperties setOverrideSystemProperties(boolean overrideSystemProperties) {
        this.overrideSystemProperties = overrideSystemProperties;
        return this;
    }

    public boolean isAllowOverride() {
        return this.allowOverride;
    }

    public AppPropertySourceBootstrapProperties setAllowOverride(boolean allowOverride) {
        this.allowOverride = allowOverride;
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy