org.springframework.cloud.netflix.turbine.stream.TurbineStreamAutoConfiguration中的字段属性需要一个类型为bean的bean

我通过了类似Spring Boot + Eureka Server + Hystrix with Turbine: empty turbine.stream的链接,但仍然没有为我工作。这个问题是 Unable to connect to Command Metric Stream. in Hystrix Dashboard issue 的继续。

我的源代码:https://github.com/javaHelper/spring-cloud-cordinating-services/tree/master/Protecting-Systems-with-Circuit-Breakers

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-01-15 10:46:04.141 ERROR 4380 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field properties in org.springframework.cloud.netflix.turbine.stream.TurbinestreamAutoConfiguration required a bean of type 'org.springframework.cloud.netflix.turbine.stream.TurbinestreamProperties' 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 'org.springframework.cloud.netflix.turbine.stream.TurbinestreamProperties' in your configuration.

只需尝试启动

涡轮机::

TurbineApplication.java

@SpringBootApplication
@EnableTurbine
public class TurbineApplication {

    public static void main(String[] args) {
        SpringApplication.run(TurbineApplication.class,args);
    }
}

application.properties

server.port=3000
spring.application.name=turbine-aggregator
eureka.client.service-url.defaultZone=http://localhost:8761/eureka
turbine.app-config=weather-app,datetime-app
turbine.cluster-name-expression=new String("default")

org.springframework.cloud.netflix.turbine.stream.TurbineStreamAutoConfiguration中的字段属性需要一个类型为bean的bean

rus_test 回答:org.springframework.cloud.netflix.turbine.stream.TurbineStreamAutoConfiguration中的字段属性需要一个类型为bean的bean

从pom.xml中删除涡轮流依赖项 那应该可以解决问题。

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-turbine-stream</artifactId>
</dependency>
,

也许您需要配置Spring才能启用涡轮的配置属性?

0
本文链接:https://www.f2er.com/2767405.html

大家都在问