我刚刚安装了具有Boot Actuator启动程序依赖项的Spring Cloud Gateway服务器(Greenwich.SR2),但是无法访问任何/ actuator / gateway或/ gateway API
我尝试激活并发布端点,但未成功: management.endpoint.gateway.enabled =真 management.endpoints.web.exposure.include =健康,网关
http://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0 org.springframework.boot 弹簧启动启动器父母 2.1.6发布 com.example 网关 0.0.1-快照 网关 Spring Boot的演示项目
<properties>
<java.version>11</java.version>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</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-eureka-client</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-devtools</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>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
我承认这是一台WebFlux + Netty服务器,但这与我阅读的内容没有任何区别。不过我一定错过了一些东西。
有人分享经验吗?
答案 0 :(得分:0)
好吧,这可耻了... / actuator / gateway中没有API;该API位于/ actuator / gateway / routes等!