|
@@ -7,14 +7,16 @@ import com.aliyun.oss.common.auth.DefaultCredentialProvider;
|
|
|
import com.ctrip.framework.apollo.Config;
|
|
import com.ctrip.framework.apollo.Config;
|
|
|
import com.ctrip.framework.apollo.ConfigService;
|
|
import com.ctrip.framework.apollo.ConfigService;
|
|
|
import groovy.util.logging.Slf4j;
|
|
import groovy.util.logging.Slf4j;
|
|
|
|
|
+import lombok.Getter;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
|
|
+@Getter
|
|
|
public class FGEncoderManager {
|
|
public class FGEncoderManager {
|
|
|
|
|
|
|
|
- private static FGEncoderManager instance = new FGEncoderManager();
|
|
|
|
|
|
|
+ private static final FGEncoderManager instance = new FGEncoderManager();
|
|
|
private final Map<String, FGEncoder> featureFGEncoderMap = new HashMap<>();
|
|
private final Map<String, FGEncoder> featureFGEncoderMap = new HashMap<>();
|
|
|
|
|
|
|
|
private final OSS client;
|
|
private final OSS client;
|
|
@@ -31,6 +33,7 @@ public class FGEncoderManager {
|
|
|
this.client = new OSSClientBuilder().build(endpoint, credentialsProvider);
|
|
this.client = new OSSClientBuilder().build(endpoint, credentialsProvider);
|
|
|
this.bucketName = config.getProperty("model.oss.bucketName", "");
|
|
this.bucketName = config.getProperty("model.oss.bucketName", "");
|
|
|
|
|
|
|
|
|
|
+ this.registerAllFGEncoder();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static FGEncoderManager getInstance() {
|
|
public static FGEncoderManager getInstance() {
|