基于接口,而非实现编程
public interface ImageStore {
String upload(Image image, String bucketName);
Image download(String url);
}
public class AliyunImageStore implements ImageStore {
//…省略属性、构造函数等…
public String upload(Image image, String bucketName) {
createBucketIfNotExisting
原创
2021-08-16 19:35:34 ·
219 阅读 ·
0 评论