Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException
时间: 2023-08-24 22:10:43 浏览: 227
回答: "Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'config.info' in value "${config.info}" 这个错误通常是由于无法解析占位符 'config.info' 导致的。\[1\]在程序中使用自动注入的方式获取值时,可能会遇到这个问题。例如,在代码中使用了 @Autowired 注解来注入依赖的配置信息,但是无法找到对应的占位符值。\[2\]这个问题可能与使用的依赖库有关。在引用\[3\]中提到的情况中,通过修改依赖库的版本,从 'spring-cloud-config-server' 到 'spring-cloud-starter-config',可以解决这个问题。你可以尝试检查你的代码中是否存在未解析的占位符,并确保依赖库的版本正确。
#### 引用[.reference_title]
- *1* *3* [Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException](https://blog.csdn.net/hhb_19930307/article/details/124205887)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Injection of autowired dependencies failed; nested exception is java.lang.Il](https://blog.csdn.net/weixin_58276266/article/details/123551450)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文