我正在使用turbine从hystrix聚合数据。当我尝试使用hystrix(localhost:23002/hystrix.strean)获取数据时,一切都很顺利。但是,当我尝试使用涡轮机获取数据时,它什么也没有显示。这是我的配置。
server:
port: 23002
spring:
application:
name: hystrix-1
eureka:
client:
serviceUrl:
defaultZone: http://t2.dcfservice.com:23001/eureka/
instance:
hostname: localhost
metadataMap:
cluster : MAIN
spring:
application.name: microservice-hystrix-turbine
server:
port: 23111
security.basic.enabled: false
turbine:
aggregator:
clusterConfig: MAIN
appConfig: hystrix-1
clusterNameExpression: metadata['cluster']
eureka:
client:
serviceUrl:
defaultZone: http://t2.dcfservice.com:23001/eureka/ 我可以通过URL:localhost:23002/hystrix.stream获取数据我的目标是通过URL localhost:23111/turine.stream?cluster=MAIN获取数据
发布于 2017-05-25 17:13:04
如果你在你的服务器上使用了精确的缩进来发布你的yml,下面的缩进是错误的。
turbine:
aggregator:
clusterConfig: MAIN
appConfig: hystrix-1
clusterNameExpression: metadata['cluster'] appConfig和clusterNameExpression必须是turbine的子级,而不是aggregator
https://stackoverflow.com/questions/44149735
复制相似问题