|
@@ -4,7 +4,6 @@ import com.aliyun.oss.OSS;
|
|
|
import com.aliyun.oss.OSSClientBuilder;
|
|
|
import com.fdkankan.fyun.config.FYunFileConfig;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Scope;
|
|
@@ -13,9 +12,6 @@ import org.springframework.stereotype.Component;
|
|
|
@Component
|
|
|
public class OssConfig {
|
|
|
|
|
|
- @Value("${fyun.oss.endPoint}")
|
|
|
- private String point;
|
|
|
-
|
|
|
@Autowired
|
|
|
private FYunFileConfig fYunFileConfig;
|
|
|
|
|
@@ -26,6 +22,6 @@ public class OssConfig {
|
|
|
@Bean
|
|
|
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
|
|
public OSS ossClient(){
|
|
|
- return new OSSClientBuilder().build(point, fYunFileConfig.getKey(), fYunFileConfig.getSecret());
|
|
|
+ return new OSSClientBuilder().build(fYunFileConfig.getEndPoint(), fYunFileConfig.getKey(), fYunFileConfig.getSecret());
|
|
|
}
|
|
|
}
|