Spring boot Hystrix不显示仪表板

Spring boot Hystrix不显示仪表板,spring-boot,spring-boot-actuator,spring-cloud-netflix,hystrix,hystrix-dashboard,Spring Boot,Spring Boot Actuator,Spring Cloud Netflix,Hystrix,Hystrix Dashboard,这就是我的pom.xml的样子 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://ma

这就是我的pom.xml的样子

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>SalaryBox</artifactId>
        <groupId>org.example</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.salary.box</groupId>
    <artifactId>greeting-service</artifactId>
    <packaging>war</packaging>

    <properties>
        <spring-cloud.version>Hoxton.SR5</spring-cloud.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
        </repository>
    </repositories>

</project>
}

当我检查URL时,流似乎生成如下所示

数据:{“类型”:“HystrixCommand”,“名称”:“findMyGreetingMessage”,“组”:“GreetingController”,“currentTime”:1591920892870,“isCircuitBreakerOpen”:false,“errorPercentage”:0,“errorCount”:0,“requestCount”:0,“rollingCountBadRequests”:0,“rollingCountCollapsedRequests”:0,“rollingCountEmit”:0,“RollingCountExceptionSprowns”:0,“rollingCountFailure”:0,“rollingCountFallbackEmit”:0,“rollingCountFallbackFailure”:0,“rollingCountFallbackMissing”:0,“rollingCountFallbackRejection”:0,“RollingCountResponseFromCache”:0,“rollingCountSemaphoreRejected”:0,“rollingCountShortCircuited”:0,“rollingCountSuccess”:0,“rollingCountThreadPoolRejected”:0,“rollingCountTimeout”:0,”currentConcurrentExecutionCount:0,“rollingMaxConcurrentExecutionCount:0,“latencyExecute”的意思是:0,“latencyExecute”:{“0”:0,“25”:0,“50”:0,“75”:0,“0”,“90”:0,“95”:0,“95”:0,“99”:0,“99”:0,“100”:0,“latencyTotal”的意思是:0,“latencyTotal”:{“0”:0,“25”:0”,“50”:0,“75”:0,“90”:0,“95”:0,“99”:0,“99:5”:0,“100”:0,“propertyValue Ethrestu Breakhold”propertyValue\u CircuitBreakerSleepIndowInMousics:5000,“propertyValue\u CircuitBreakerErrorResholdPercentage”:50,“propertyValue\u CircuitBreakerForPeopen”:false,“propertyValue\u CircuitBreakerForClosed”:false,“propertyValue\u circuitBreakerEnabled”:true,“propertyValue\u executionIsolationStrategy”:“THREAD”propertyValue_ExecutionIsolationThreadTimeoutInMissicles:1000,“propertyValue_ExecutionTimeoutInMissicles”:1000,“propertyValue_ExecutionIsolationThreadInterruptimeout”:true,“propertyValue_executionIsolationThreadPoolKeyOverride”:null,“propertyValue_executionIsolationSemaphoreMaxConcurrentRequests”:10,“propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests“:10,“propertyValue_MetricsRollingStatisticalIndowinMillics”:10000,“propertyValue_requestCacheEnabled”:true,“propertyValue_requestLogEnabled”:true,“reportingHosts”:1,“threadPool”:“GreetingController”}

数据:{“type”:“HystrixThreadPool”,“name”:“GreetingController”,“currentTime”:1591920892870,“currentActiveCount”:0,“currentCompletedTaskCount”:2,“currentCorePoolSize”:10,“currentLargestPoolSize”:2,“currentMaximumPoolSize”:10,“currentPoolSize”:2,“currentQueueSize”:0,“currentTaskCount”:2,“rollingCountThreadsExecuted”:0,“rollingMaxActiveThreads”:0rollingCountCommandRejections:0,“propertyValue_QueueSizeRejectionReshold”:5,“propertyValue_MetricsRollingStatisticalIndowInMousions”:10000,“reportingHosts”:1}

平:

数据:{“类型”:“HystrixCommand”,“名称”:“findMyGreetingMessage”,“组”:“GreetingController”,“currentTime”:1591920893373,“isCircuitBreakerOpen”:false,“errorPercentage”:0,“errorCount”:0,“requestCount”:0,“rollingCountBadRequests”:0,“rollingCountCollapsedRequests”:0,“rollingCountEmit”:0,“RollingCountExceptionSprowns”:0,“rollingCountFailure”:0rollingCountFallbackEmit”:0,“rollingCountFallbackFailure”:0,“rollingCountFallbackMissing”:0,“rollingCountFallbackRejection”:0,“RollingCountResponseFromCache”:0,“rollingCountSemaphoreRejected”:0,“rollingCountShortCircuited”:0,“rollingCountSuccess”:0,“rollingCountThreadPoolRejected”:0,“rollingCountTimeout”:0,”currentConcurrentExecutionCount:0,“rollingMaxConcurrentExecutionCount:0,“latencyExecute”的意思是:0,“latencyExecute”:{“0”:0,“25”:0,“50”:0,“75”:0,“0”,“90”:0,“95”:0,“95”:0,“99”:0,“99”:0,“100”:0,“latencyTotal”的意思是:0,“latencyTotal”:{“0”:0,“25”:0”,“50”:0,“75”:0,“90”:0,“95”:0,“99”:0,“99:5”:0,“100”:0,“propertyValue Ethrestu Breakhold”propertyValue\u CircuitBreakerSleepIndowInMousics:5000,“propertyValue\u CircuitBreakerErrorResholdPercentage”:50,“propertyValue\u CircuitBreakerForPeopen”:false,“propertyValue\u CircuitBreakerForClosed”:false,“propertyValue\u circuitBreakerEnabled”:true,“propertyValue\u executionIsolationStrategy”:“THREAD”propertyValue_ExecutionIsolationThreadTimeoutInMissicles:1000,“propertyValue_ExecutionTimeoutInMissicles”:1000,“propertyValue_ExecutionIsolationThreadInterruptimeout”:true,“propertyValue_executionIsolationThreadPoolKeyOverride”:null,“propertyValue_executionIsolationSemaphoreMaxConcurrentRequests”:10,“propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests“:10,“propertyValue_MetricsRollingStatisticalIndowinMillics”:10000,“propertyValue_requestCacheEnabled”:true,“propertyValue_requestLogEnabled”:true,“reportingHosts”:1,“threadPool”:“GreetingController”}

数据:{“type”:“HystrixThreadPool”,“name”:“GreetingController”,“currentTime”:1591920893373,“currentActiveCount”:0,“currentCompletedTaskCount”:2,“currentCorePoolSize”:10,“currentLargestPoolSize”:2,“currentMaximumPoolSize”:10,“currentPoolSize”:2,“currentQueueSize”:0,“currentTaskCount”:2,“rollingCountThreadsExecuted”:0,“rollingMaxActiveThreads”:0rollingCountCommandRejections:0,“propertyValue_QueueSizeRejectionReshold”:5,“propertyValue_MetricsRollingStatisticalIndowInMousions”:10000,“reportingHosts”:1}

平:

但是,即使在多次刷新仪表板并尝试点击url之后,仪表板似乎仍停留在这一点上。

我错过了什么?

@Autowired
public GreetingsService greetingsService;

@HystrixCommand(fallbackMethod = "defaultMessage")
@RequestMapping("/greeting/{id}")
public Greeting findMyGreetingMessage(@PathVariable Long id) {
    Greeting greeting = new Greeting();
    greeting.setMessage(greetingsService.getMessage(id));
    return greeting;
}

public Greeting defaultMessage(Long id){
    Greeting greeting = new Greeting();
    greeting.setMessage("Message service seems to be broken");
    return greeting;
}