FastDFS Destination image dimensions must not be less than 0 pixels

博客讲述了FastDFS整合Spring-boot后上传文件报错的情况,经百度未找到相关错误,重新编写代码并与原文件对比后,发现是配置文件中缩率图一栏缩进未调整好,导致出现莫名其妙的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

FastDFS报错


Destination image dimensions must not be less than 0 pixels

FastDFS整合Spring-bot后,实验上传文件时报错,百度以后没有相关错误,自己从头写了一遍成功后和原文件比较.
发现是配置文件中的缩进出现问题(捂脸)

#异常内容

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: Destination image dimensions must not be less than 0 pixels.] with root cause

java.lang.IllegalArgumentException: Destination image dimensions must not be less than 0 pixels.
at net.coobird.thumbnailator.Thumbnails.validateDimensions(Unknown Source) ~[thumbnailator-0.4.8.jar:0.4.8]
at net.coobird.thumbnailator.Thumbnails.access$1700(Unknown Source) ~[thumbnailator-0.4.8.jar:0.4.8]
at net.coobird.thumbnailator.Thumbnails$Builder.size(Unknown Source) ~[thumbnailator-0.4.8.jar:0.4.8]

然后是配置文件

// An highlighted block
fdfs:
  so-timeout: 1500
  connect-timeout: 600
  pool:
    jmx-enabled: false
  thumb-image:
    width: 100
    height: 100
  tracker-list: 10.30.161.57:22122

配置文件中的缩率图一栏缩进没有调整好,导致这个莫名其妙的错误.(看报错是真的不知道他错在哪里.)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值