51 行
1.9 KiB
Java
51 行
1.9 KiB
Java
|
|
package com.xuqm.tenant.config;
|
||
|
|
|
||
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||
|
|
import org.springframework.stereotype.Component;
|
||
|
|
|
||
|
|
@Component
|
||
|
|
@ConfigurationProperties(prefix = "deployment")
|
||
|
|
public class PrivateDeploymentProperties {
|
||
|
|
|
||
|
|
private String mode = "PUBLIC";
|
||
|
|
private boolean tenantRegisterEnabled = true;
|
||
|
|
private boolean tenantBootstrapEnabled = false;
|
||
|
|
private boolean enableIm = false;
|
||
|
|
private boolean enablePush = false;
|
||
|
|
private boolean enableUpdate = false;
|
||
|
|
private boolean enableLicense = false;
|
||
|
|
private boolean enableFile = true;
|
||
|
|
|
||
|
|
public boolean isPrivate() {
|
||
|
|
return "PRIVATE".equalsIgnoreCase(mode);
|
||
|
|
}
|
||
|
|
|
||
|
|
public String getMode() { return mode; }
|
||
|
|
public void setMode(String mode) { this.mode = mode; }
|
||
|
|
|
||
|
|
public boolean isTenantRegisterEnabled() { return tenantRegisterEnabled; }
|
||
|
|
public void setTenantRegisterEnabled(boolean tenantRegisterEnabled) {
|
||
|
|
this.tenantRegisterEnabled = tenantRegisterEnabled;
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isTenantBootstrapEnabled() { return tenantBootstrapEnabled; }
|
||
|
|
public void setTenantBootstrapEnabled(boolean tenantBootstrapEnabled) {
|
||
|
|
this.tenantBootstrapEnabled = tenantBootstrapEnabled;
|
||
|
|
}
|
||
|
|
|
||
|
|
public boolean isEnableIm() { return enableIm; }
|
||
|
|
public void setEnableIm(boolean enableIm) { this.enableIm = enableIm; }
|
||
|
|
|
||
|
|
public boolean isEnablePush() { return enablePush; }
|
||
|
|
public void setEnablePush(boolean enablePush) { this.enablePush = enablePush; }
|
||
|
|
|
||
|
|
public boolean isEnableUpdate() { return enableUpdate; }
|
||
|
|
public void setEnableUpdate(boolean enableUpdate) { this.enableUpdate = enableUpdate; }
|
||
|
|
|
||
|
|
public boolean isEnableLicense() { return enableLicense; }
|
||
|
|
public void setEnableLicense(boolean enableLicense) { this.enableLicense = enableLicense; }
|
||
|
|
|
||
|
|
public boolean isEnableFile() { return enableFile; }
|
||
|
|
public void setEnableFile(boolean enableFile) { this.enableFile = enableFile; }
|
||
|
|
}
|