zl程序教程

您现在的位置是:首页 >  后端

当前栏目

【异常】spring.factories机制解决外部配置文件无法被读取提示Field XXX in XXX that could not be found的问题

Spring异常配置文件 解决 in not 机制 无法
2023-09-14 09:04:55 时间

一、异常内容

SpringCloud项目中 thirdparty-api 子服务无法正常启动,提示了如下的异常内容。

***************************
APPLICATION FAILED TO START
***************************
Description:
Field jDConfigProperties in thirdparty.api.service.impl.jd.JDTokenServiceImpl required a bean of type 'mall.common.config.JDConfigProperties' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'mall.common.config.JDConfigProperties' in your configuration.