报错:Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘oss.ossDomain‘

场景

配置文件里的配置写错,与Spring里面注入的不一致,然后无法识别,重启不了项目。

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ossController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'oss.ossDomain' in value "${oss.ossDomain}"
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'oss.ossDomain' in value "${oss.ossDomain}"
	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178)

处理方式

修改配置文件或者代码里的代码即可。

突发事件说明

如果发现你改了之后,还启动不了,你需要认真看一下报错信息。

因为,你如果有好几个地方用到,你只改了一个地方也是不行的。

上一篇:如何搭建本地yum源与在线yum源


下一篇:This application failed to start because no Qt platform plugin could be initialized问题解决合集