org.zodiac.autoconfigure.bootstrap.AppPropertySourceBootstrapProperties Maven / Gradle / Ivy
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;
}
}