无法创建minIOConfig的bean

来源:5-23 整合MinIO与SpringBoot

慕容0208785

2023-10-24

请教老师,minIOConfig的bean创建失败,虽然报错这么说,我觉得配置文件和minIOUtils都没错。浏览器可以正常运行minIO。使用的POM为8.5.6。报错如下:

https://img.mukewang.com/szimg/6537e0cf098a067619430247.jpg


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文件如下:

https://img.mukewang.com/szimg/6537e0ab09c4d8ff03520231.jpg

MinIOConfig和MinIOUtils都是直接粘贴的,没有改动

MinIOConfig

https://img.mukewang.com/szimg/6537e1c4096c704408360587.jpg

写回答

1回答

风间影月

2023-10-24

类型不对,检查一下看看,他无法解析

0
6
风间影月
回复
慕容0208785
额,这个用肉眼的确很难看得出,😂
2023-10-25
共6条回复

SpringBoot+Uniapp实战开发仿抖音短视频App

使用新版SpringBoot技术结合Uniapp,完成仿抖音短视频项目

733 学习 · 709 问题

查看课程