【发布时间】:2017-12-13 18:57:40
【问题描述】:
我正在对我的一个项目工件进行一些转换,以便我们可以使用 spring boot 运行它,而不仅仅是部署到 jboss,以及添加执行器。这已经很顺利了,但是在使一切都在 spring boot 上运行的过程中,我破坏了将 WAR 部署到 jboss 的能力。
具体来说,我已将 BuildInformation 添加到我们的部署信息端点。根据我对执行器和 build-info.properties 创建的理解,以及我在试图找到其他有此问题的人时发现的每一个谷歌结果,我目前正在做的事情应该是在职的。我有
compile 'org.springframework.boot:spring-boot-starter-actuator'
在我的平台级项目的 gradle 的 subprojects 部分(以及我们使用的所有其他 spring-boot 依赖项)。 springBoot 任务配置为运行buildInfo()。生成的 WAR 文件在 /WEB-INF/classes/META-INF/ 下具有 build-info.properties 文件。一切似乎都完全按照应有的方式组合在一起。然而:
13:09:59,517 ERROR [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 53) Context initialization failed: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pingController' defined in VFS resource ["<snip>/PingController.class"]: Unsatisfied dependency expressed through constructor parameter 0; 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: {}
对我应该去哪里有什么想法吗?
【问题讨论】:
标签: java spring spring-boot gradle spring-boot-actuator