93 lines
2.2 KiB
Java
93 lines
2.2 KiB
Java
package com.kaidi.oa.config;
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/** Runtime configuration for the Gitea release updater. */
|
|
@Component
|
|
@ConfigurationProperties(prefix = "oa.update")
|
|
public class UpdateProperties {
|
|
|
|
private boolean enabled;
|
|
private String giteaBaseUrl = "";
|
|
private String repository = "awaioi/ERP";
|
|
private String channel = "stable";
|
|
private String token = "";
|
|
private String helperCommand = "";
|
|
private String stateFile = "./runtime/update-state.json";
|
|
private boolean allowInsecureHttp;
|
|
private int requestTimeoutSeconds = 15;
|
|
|
|
public boolean isEnabled() {
|
|
return enabled;
|
|
}
|
|
|
|
public void setEnabled(boolean enabled) {
|
|
this.enabled = enabled;
|
|
}
|
|
|
|
public String getGiteaBaseUrl() {
|
|
return giteaBaseUrl;
|
|
}
|
|
|
|
public void setGiteaBaseUrl(String giteaBaseUrl) {
|
|
this.giteaBaseUrl = giteaBaseUrl;
|
|
}
|
|
|
|
public String getRepository() {
|
|
return repository;
|
|
}
|
|
|
|
public void setRepository(String repository) {
|
|
this.repository = repository;
|
|
}
|
|
|
|
public String getChannel() {
|
|
return channel;
|
|
}
|
|
|
|
public void setChannel(String channel) {
|
|
this.channel = channel;
|
|
}
|
|
|
|
public String getToken() {
|
|
return token;
|
|
}
|
|
|
|
public void setToken(String token) {
|
|
this.token = token;
|
|
}
|
|
|
|
public String getHelperCommand() {
|
|
return helperCommand;
|
|
}
|
|
|
|
public void setHelperCommand(String helperCommand) {
|
|
this.helperCommand = helperCommand;
|
|
}
|
|
|
|
public String getStateFile() {
|
|
return stateFile;
|
|
}
|
|
|
|
public void setStateFile(String stateFile) {
|
|
this.stateFile = stateFile;
|
|
}
|
|
|
|
public boolean isAllowInsecureHttp() {
|
|
return allowInsecureHttp;
|
|
}
|
|
|
|
public void setAllowInsecureHttp(boolean allowInsecureHttp) {
|
|
this.allowInsecureHttp = allowInsecureHttp;
|
|
}
|
|
|
|
public int getRequestTimeoutSeconds() {
|
|
return requestTimeoutSeconds;
|
|
}
|
|
|
|
public void setRequestTimeoutSeconds(int requestTimeoutSeconds) {
|
|
this.requestTimeoutSeconds = requestTimeoutSeconds;
|
|
}
|
|
}
|