在做图片上传的时候(springboot+vue,前后端分离),费好大劲解决跨域问题后。然后请求到SpringBoot时,读取配置文件信息时,读取失败抛出异常,报错信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'picInfoController':
Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException:
Could not resolve placeholder 'prop.upload-folder' in value "${prop.upload-folder}"
原因:没有获得配置文件中的属性信息,打开application.properties文件发现没有指定图片存放路径,加上指定路径,问题解决!