Spring Boot 整合FastDFS
1 、在 web 层,导入依赖: <!-- 整合FastDFS --> < dependency > < groupId > com.github.tobato </ groupId > < artifactId > fastdfs-client </ artifactId > < version > 1.26.1-RELEASE </ version > </ dependency > 2 、启动类中添加注解: @Import(FdfsClientConfig.class) @Import(FdfsClientConfig. class ) @SpringBootApplication public class TestApplication { ... } 3 、配置 application.yml: fdfs: so-timeout: 1500 connect-timeout: 600 pool: jmx-enabled: false thumb-image: width: 100 height: 100 tracker-list: 192.168.80.134:22122 4 、测试: @RunWith(SpringRunner. class ) @SpringBootTest public class MystoreProductWebApplicationTests {