后端开发3.Fastdfs的搭建
使用Docker安装
拉取镜像
docker pull registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
启动容器(修改ip)【fastdfs/自启动】(22122/23000/8888)
docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP=你的ip地址 -e WEB_PORT=8888 -v ${HOME}/fastdfs:/var/local/fdfs registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
Springboot集成
依赖
<!-- FastDFS -->
<dependency>
<groupId>com.github.tobato</groupId>
<artifactId>fastdfs-client</artifactId>
<version>1.26.5</version>
</dependency>