概述
给服务配置一个管理端口
创建工程
application.yml
management: # spring-boot-starter-acturator
port: 8081
spring:
application:
name: microservice-consumer-movie-ribbon-with-hystrix3
server:
port: 8010
context-path: /ribbon
eureka:
client:
healthcheck:
enabled: true
serviceUrl:
defaultZone: http://user:password123@localhost:8761/eureka
instance:
prefer-ip-address: true
metadata-map:
management.port: 8081
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000
说明:
1)给一个服务配置2个端口,一个管理端口8081,一个访问端口8010;
测试
1)http://localhost:8761/