相关依赖
<!-- https://mvnrepository.com/artifact/net.oschina.zcx7878/fastdfs-client-java -->
<dependency>
<groupId>net.oschina.zcx7878</groupId>
<artifactId>fastdfs-client-java</artifactId>
<version>1.27.0.0</version>
</dependency>
FastDFS上传客户端工具类
/**
* FastDFS文件系统客户端
* @author: Kellan_Song
* @date: 2019-08-04 21:12
**/
@Component
public class FastDFSClient {
private final String GROUP_NAME = "group1"; //群组名
private TrackerClient trackerClient;
private TrackerServer trackerServer;
private StorageServer storageServer;
private StorageClient storageClient;
public FastDFSClient() throws Exception {
ClientGlobal.initByTrackers("193.112.40.54:22122");
trackerClient = new TrackerClient(ClientGlobal.g_tracker_group);
trackerServer = trackerClie