springboot 集成 fastdfs
1 引入jar <dependency> <groupId>com.github.tobato</groupId> <artifactId>fastdfs-client</artifactId> <version>1.26.1-RELEASE</version> </dependency> 说明: springboot的版本为2.0以上时候,使用1.26.1-RELEASE版本 2 引入配置: @Configuration @Import(FdfsClientConfig.class) // 解决jmx重复注册bean的问题 @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING) public class FastClientImporter { } 3 yml 配置: fdfs: so-timeout: 1501 connect-timeout: 601 thumb-image: # 缩略图 width: 60 height: 60 tracker-list: # tracker地址 10.96.165.173:22122 4使用: @Service public class PictureServiceImpl implements PictureService { @Autowired