From 64c78cfc7c35e714268b4172f58705c398fbba63 Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期四, 30 三月 2023 12:39:16 +0800
Subject: [PATCH] 容器配置

---
 ZuulTravel/src/main/resources/application.yml |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ZuulTravel/src/main/resources/application.yml b/ZuulTravel/src/main/resources/application.yml
index 156f3ed..c66d226 100644
--- a/ZuulTravel/src/main/resources/application.yml
+++ b/ZuulTravel/src/main/resources/application.yml
@@ -11,6 +11,9 @@
       defaultZone: http://sinata:sinata@172.17.0.7:8081/eureka #启用身份验证的方式连接
     register-with-eureka: true #在注册中心进行注册
     fetch-registry: true #从Eureka中获取注册信息。
+  instance:
+    prefer-ip-address: true  #使用ip注册到Eureka
+    instance-id: zuul-gateway:5000  #指定客户端实例的ID
 
 zuul:
 #  prefix: /api #添加URL前缀

--
Gitblit v1.7.1