/*    */ package com.picc.grab.config;
/*    */ 
/*    */ import com.aliyun.oss.OSS;
/*    */ import com.aliyun.oss.OSSClientBuilder;
/*    */ import org.springframework.beans.factory.annotation.Value;
/*    */ import org.springframework.stereotype.Component;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Component
/*    */ public class UploadConfig
/*    */ {
/* 14 */   private static volatile OSS ossClient = null;
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.uploadType}")
/*    */   public int uploadType;
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.uploadPathType}")
/*    */   public int uploadPathType;
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.uploadPath}")
/*    */   public String uploadPath;
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.oss.endpoint}")
/*    */   private String endpoint;
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.oss.accessKeyId}")
/*    */   private String accessKeyId;
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.oss.accessKeySecret}")
/*    */   private String accessKeySecret;
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.oss.bucketName}")
/*    */   public String bucketName;
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.oss.logoImgPath}")
/*    */   public String logoImgPath;
/*    */ 
/*    */ 
/*    */   
/*    */   @Value("${cpm.uploadConf.oss.readUrl}")
/*    */   public String readUrl;
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public OSS getNewInstance() {
/* 69 */     OSS ossClient = (new OSSClientBuilder()).build(this.endpoint, this.accessKeyId, this.accessKeySecret);
/* 70 */     return ossClient;
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public synchronized OSS getSingletonInstance() {
/* 79 */     if (ossClient == null) {
/* 80 */       ossClient = (new OSSClientBuilder()).build(this.endpoint, this.accessKeyId, this.accessKeySecret);
/* 81 */       return ossClient;
/*    */     } 
/* 83 */     return ossClient;
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public void clientShutdown() {
/* 92 */     ossClient.shutdown();
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\config\UploadConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */