【发布时间】:2017-06-01 00:09:33
【问题描述】:
背景
我将 Mule 运行时用作在单独服务器上运行的基础架构组件。我想确定在我的应用程序中实现 Mule 客户端的最佳实践。
问题
我在尝试在我的 Spring Boot REST 应用程序中使用 MuleClient 时遇到了各种问题(通过 org.mule.modules/mule-module-client/3.8.1 maven 依赖项):
1) mule (log4j) 中的日志记录子系统与 Spring Boot (logback) 的默认值冲突。这可以通过将 Spring Boot 切换到 log4j (https://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html) 来解决
2) Mule Client 引入了对org.jgrapht/jgrapht-jdk1.5/0.7.3 的依赖,这会在启动时产生错误Ignoring Class-Path entry lib/jgraph.jar found in ...
3) 最重要的是 spring boot 应用启动失败,出现如下错误:
Description:
Parameter 0 of method cacheManagerCustomizers in
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration required a bean of type 'org.springframework.beans.factory.ObjectProvider' that could not be found.
Action:
Consider defining a bean of type
'org.springframework.beans.factory.ObjectProvider' in your configuration.
如果我从应用程序中删除 @EnableCaching 注释,同样的错误会在另一个依赖注入中表现出来:
Parameter 1 of constructor in
org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration required a bean of type 'org.springframework.beans.factory.ObjectProvider' that could not be found.
问题
1) 请问有解决这些错误的想法吗?
2) 在我的应用程序中使用 MuleClient 是否值得(并且可以访问消息、事件、流等......)还是应该回退到普通的 HTTP REST 客户端?
谢谢!
【问题讨论】:
标签: java spring spring-boot mule