f78b010f by chentao

no message

1 parent 0877b00a
...@@ -22,6 +22,7 @@ import com.lego.oss.enumd.AccessPolicyType; ...@@ -22,6 +22,7 @@ import com.lego.oss.enumd.AccessPolicyType;
22 import com.lego.oss.enumd.PolicyType; 22 import com.lego.oss.enumd.PolicyType;
23 import com.lego.oss.exception.OssException; 23 import com.lego.oss.exception.OssException;
24 import com.lego.oss.properties.OssProperties; 24 import com.lego.oss.properties.OssProperties;
25 import lombok.extern.slf4j.Slf4j;
25 26
26 import java.io.ByteArrayInputStream; 27 import java.io.ByteArrayInputStream;
27 import java.io.File; 28 import java.io.File;
...@@ -35,6 +36,7 @@ import java.util.Date; ...@@ -35,6 +36,7 @@ import java.util.Date;
35 * 36 *
36 * @author Lion Li 37 * @author Lion Li
37 */ 38 */
39 @Slf4j
38 public class OssClient { 40 public class OssClient {
39 41
40 private final String configKey; 42 private final String configKey;
...@@ -161,7 +163,8 @@ public class OssClient { ...@@ -161,7 +163,8 @@ public class OssClient {
161 } 163 }
162 164
163 public InputStream getObjectContent(String path) { 165 public InputStream getObjectContent(String path) {
164 path = path.replace(getUrl() + "/", ""); 166 log.info("=====getUrl()=="+getUrl());
167 path = path.replace("http://127.0.0.1:9000" + "/", "");
165 S3Object object = client.getObject(properties.getBucketName(), path); 168 S3Object object = client.getObject(properties.getBucketName(), path);
166 return object.getObjectContent(); 169 return object.getObjectContent();
167 } 170 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!