Could not resolve placeholder ‘*‘ in value “${*}“

简介: Could not resolve placeholder ‘*‘ in value “${*}“

在学习 Spring Alibaba nacos 的过程中,遇到了一个十分头疼的问题。

Could not resolve placeholder 'config.info' in value "${config.info}"

在nacos服务中配置的 配置信息 一直无法获取到,按照文档中的命名格式,完全没有问题。
说明:之所以需要配置spring.application.name,是因为它是构成Nacos配置管理dataId 字段的一部分。

在 Nacos Spring Cloud中,dataId的完整格式如下:

${prefix}-${spring-profile.active}.${file-extension}

在这里插入图片描述
我的是 dev 环境,所以配置完成之后是 nacos-config-client-dev.yaml
在这里插入图片描述
在 nacos 中也配置完成!但是当跑微服务的时候就会报错找不到,我在网上看过需要博客,无非就是让检查后缀是否一样,配置是否一样,重启nacos。但是完全没有效果!(当然,这确实是常见的问题,并不排除这种些情况)

在这里插入图片描述

最后无意之间将 group 删掉跑了一次发现竟然可以跑起来!

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

总结:关于 nacos 配置的 group 没有进行自定义 在配置文件中就不要填写这一项,如果自定义过,可以填写自己自定义的名称!

目录
相关文章
|
10月前
TypeError:Joi.validate is not a function 解决办法
TypeError:Joi.validate is not a function 解决办法
|
2月前
|
JavaScript 前端开发
15 Uncaught TypeError: Cannot set properties of null (setting ‘onclick‘)
这篇文章解释了在HTML文档中因JavaScript代码在页面元素加载之前执行导致的"Cannot set properties of null (setting ‘onclick’)"错误,并提供了将JavaScript代码置于`<body>`标签内或使用`window.onload`事件确保DOM完全加载后再绑定事件处理器的解决办法。
15 Uncaught TypeError: Cannot set properties of null (setting ‘onclick‘)
|
3月前
|
Java Maven
Cannot resolve method ‘success‘ in ‘Result‘
Cannot resolve method ‘success‘ in ‘Result‘
|
5月前
|
JavaScript
Vue报错 Invalid default value for prop “list“: Props with type Object/Array must use a factory
Vue报错 Invalid default value for prop “list“: Props with type Object/Array must use a factory
282 0
|
5月前
|
JavaScript 前端开发
完美解决 报错 Vue Invalid prop: type check failed for prop “min“. Expected Number with value 1,
完美解决 报错 Vue Invalid prop: type check failed for prop “min“. Expected Number with value 1,
191 1
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
Error: Element type is invalid: expected a string (for built-in components) or a class/function
2527 0
【已解决】Error: Element type is invalid: expected a string (for built-in components) or a class/function
|
5月前
|
API iOS开发 MacOS
WAServiceMainContext.js:2 ReferenceError: result is not defined
WAServiceMainContext.js:2 ReferenceError: result is not defined
33 0
|
11月前
|
JavaScript
vue 报错-Module not found: Error: Can't resolve 'element-plus' in '
vue 报错-Module not found: Error: Can't resolve 'element-plus' in '
254 1
|
前端开发 JavaScript
前端vue:解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
前端vue:解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
1334 0
前端vue:解决Invalid prop: type check failed for prop “model“. Expected Object, got Array问题
|
12月前
|
人工智能 自然语言处理 语音技术
Invalid prop: type check failed for prop “index“. Expected String with value “5“问题解决
Invalid prop: type check failed for prop “index“. Expected String with value “5“问题解决
100 0