package com.iplatform.base.config;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
@ConfigurationProperties(prefix = "iplatform.file")
|
public class FileProperties {
|
|
public String getFileRoot() {
|
return fileRoot;
|
}
|
|
public void setFileRoot(String fileRoot) {
|
this.fileRoot = fileRoot;
|
}
|
|
/**
|
* 调用远程上传文件,是否按照本地方式处理。
|
* <pre>
|
* 1)该选项为了适应没有FTP等服务的情况,特别是在开发过程,如果设置为:true 则调用远程上传方法后文件仍然保存在本地。
|
* 2)如果生产环境存在合适的文件存储服务,则需要设置为:false
|
* </pre>
|
* @return
|
* @date 2023-07-03
|
*/
|
public boolean isRemoteAsLocal() {
|
return remoteAsLocal;
|
}
|
|
public void setRemoteAsLocal(boolean remoteAsLocal) {
|
this.remoteAsLocal = remoteAsLocal;
|
}
|
|
/**
|
* oss实现类型:aws_s3(亚马逊) | tx(腾讯) | ali(阿里) | qn(七牛)
|
* @return
|
* @date 2023-12-13
|
*/
|
public String getOssType() {
|
return ossType;
|
}
|
|
public void setOssType(String ossType) {
|
this.ossType = ossType;
|
}
|
|
/**
|
* oss访问前缀,如:http://localhost:8082/admin/oss/
|
* @return
|
* @date 2023-12-13
|
*/
|
public String getOssPrefix() {
|
return ossPrefix;
|
}
|
|
public void setOssPrefix(String ossPrefix) {
|
this.ossPrefix = ossPrefix;
|
}
|
|
public String getOssAccessKey() {
|
return ossAccessKey;
|
}
|
|
public void setOssAccessKey(String ossAccessKey) {
|
this.ossAccessKey = ossAccessKey;
|
}
|
|
public String getOssSecretKey() {
|
return ossSecretKey;
|
}
|
|
public void setOssSecretKey(String ossSecretKey) {
|
this.ossSecretKey = ossSecretKey;
|
}
|
|
public String getOssEndpoint() {
|
return ossEndpoint;
|
}
|
|
public void setOssEndpoint(String ossEndpoint) {
|
this.ossEndpoint = ossEndpoint;
|
}
|
|
public String getOssBucketName() {
|
return ossBucketName;
|
}
|
|
public void setOssBucketName(String ossBucketName) {
|
this.ossBucketName = ossBucketName;
|
}
|
|
public String getProtocolStr() {
|
return protocolStr;
|
}
|
|
public void setProtocolStr(String protocolStr) {
|
this.protocolStr = protocolStr;
|
}
|
|
private String ossAccessKey;
|
private String ossSecretKey;
|
private String ossEndpoint;
|
private String ossBucketName;
|
private String ossType;
|
private String ossPrefix;
|
private String protocolStr = "http";
|
private boolean remoteAsLocal = true;
|
private String fileRoot = null;
|
|
}
|