引入必要依赖
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv-platform</artifactId>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.26</version>
</dependency>
工具类
public class UploadResult implements Serializable {
private static final long serialVersionUID = 1L;
private String url;
private String md5;
private String path;
private String domain;
private String scene;
private String scenes;
private BigInteger size;
private BigInteger mtime;
private String retmsg;
private int retcode;
private String src;
private String filename;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMd5() {
return md5;
}
public void setMd5(String md5) {
this.md5 = md5;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public String getScene() {
return scene;
}
public void setScene(String scene) {
this.scene = scene;
}
public BigInteger getSize() {
return size;
}
public void setSize(BigInteger size) {
this.size = size;
}
public BigInteger getMtime() {
return mtime;
}
public void setMtime(BigInteger mtime) {
this.mtime = mtime;
}
public String getScenes() {
return scenes;
}
public void setScenes(String scenes) {
this.scenes = scenes;
}
public String getRetmsg() {
return retmsg;
}
public void setRetmsg(String retmsg) {
this.retmsg = retmsg;
}
public int getRetcode() {
return retcode;
}
public void setRetcode(int retcode) {
this.retcode = retcode;
}
public String getSrc() {
return src;
}
public void setSrc(String src) {
this.src = src;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public boolean isSuccess() {
return retcode == 0;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("UploadResult{");
sb.append("url='").append(url).append('\'');
sb.append(", md5='").append(md5).append('\'');
sb.append(", path='").append(path).append('\'');
sb.append(", domain='").append(domain).append('\'');
sb.append(", scene='").append(scene).append('\'');
sb.append(", scenes='").append(scenes).append('\'');
sb.append(", size=").append(size);
sb.append(", mtime=").append(mtime);
sb.append(", retmsg='").append(retmsg).append('\'');
sb.append(", retcode=").append(retcode);
sb.append(", src='").append(src).append('\'');
sb.append('}');
return sb.toString();
}
}