无法创建minIOConfig的bean
来源:5-23 整合MinIO与SpringBoot

慕容0208785
2023-10-24
请教老师,minIOConfig的bean创建失败,虽然报错这么说,我觉得配置文件和minIOUtils都没错。浏览器可以正常运行minIO。使用的POM为8.5.6。报错如下:
2023-10-24 23:12:00.262 ERROR 46290 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'minIOConfig': Unsatisfied dependency expressed through field 'imgSize'; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "${minio.imgSize}"
yml文件如下:
MinIOConfig和MinIOUtils都是直接粘贴的,没有改动
MinIOConfig
1回答
-
风间影月
2023-10-24
类型不对,检查一下看看,他无法解析
062023-10-25
相似问题