问题描述
我正在使用 Eclipse 和 maven 进行构建。 我有一个 SpringBoot 项目,它运行了 2 到 3 年都非常好。 今天,在尝试开始我的项目后,我遇到了这个问题:
2021-01-27 15:22:47.974 WARN 24416 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'statusConfiguration': Unsatisfied dependency expressed through field 'buildProperties'; nested exception is org.springframework.beans.factory.NoSuchBeanDeFinitionException: No qualifying bean of type 'org.springframework.boot.info.BuildProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
此错误导致(我的控制器/程序的入口点):
Field buildProperties in com.mypackage.configuration.StatusConfiguration required a bean of type 'org.springframework.boot.info.BuildProperties' that Could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
可能是什么问题?
- 我已经清理了我的项目
- 我已经删除了我所有的 Maven 存储库(如果库没有正确下载)
Eclipse 的问题视图中没有显示任何问题。 编辑类时,我设法从我的代码中访问了 BuildProperties。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)