Could not resolve placeholder ‘rest.article.url‘ in value “${rest.article.url}“ 主方法报错:解决

springboot项目服务器启动报错

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'articleController': Unsatisfied dependency expressed through field 'articleService'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'articleServiceImpl': Injection of autowired dependencies failed; nested exception is 
java.lang.IllegalArgumentException: Could not resolve placeholder 'rest.article.url' in value "${rest.article.url}"
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.4.jar:5.3.4]

报错信息很清楚 Could not resolve placeholder ‘rest.article.url’ in value “${rest.article.url}”

可是这里一点毛病没有啊
在这里插入图片描述
再看下配置文件 application.yml
在这里插入图片描述

在这里插入图片描述
不能顶头 , 要有空格 解决完毕~!


版权声明:本文为zhhhhhh1213原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。