use of com.zhouzifei.tool.config.FastDfsFileProperties in project simpleFS by shengdingbox.
the class FastDfsOssApiClient method init.
@Override
public FastDfsOssApiClient init(FileProperties fileProperties) {
final FastDfsFileProperties fastDfsFileProperties = fileProperties.getFast();
this.serverUrl = fastDfsFileProperties.getServerUrl();
this.domainUrl = fastDfsFileProperties.getUrl();
checkDomainUrl(domainUrl);
Properties props = new Properties();
props.put(ClientGlobal.PROP_KEY_TRACKER_SERVERS, serverUrl);
try {
ClientGlobal.initByProperties(props);
} catch (IOException e) {
throw new ServiceException("[" + this.storageType + "]尚未配置阿里云FastDfs,文件上传功能暂时不可用!");
}
return this;
}
Aggregations