用kubernetes.docker.internal来解决docker中互相访问的问题

pull/120/head
choqy 4 years ago
parent 850dbb7ffc
commit 54dd58673c

@ -14,8 +14,8 @@ import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
* *
* *
* IP访dockerurl访 * IP访dockerurl访
* lynn.server.local IP使hosts * kubernetes.docker.internal IP使hosts
* url = "http://lynn.server.local:9201/", * url = "http://kubernetes.docker.internal:9201/",
*/ */
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class) @FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteFileService public interface RemoteFileService

@ -15,8 +15,8 @@ import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
* *
* *
* IP访dockerurl访 * IP访dockerurl访
* lynn.server.local IP使hosts * kubernetes.docker.internal IP使hosts
* url = "http://lynn.server.local:9201/", * url = "http://kubernetes.docker.internal:9201/",
*/ */
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class) @FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteLogService public interface RemoteLogService

@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.RequestHeader;
* *
* *
* IP访dockerurl访 * IP访dockerurl访
* lynn.server.local IP使hosts * kubernetes.docker.internal IP使hosts
* url = "http://lynn.server.local:9200/", * url = "http://kubernetes.docker.internal:9200/",
*/ */
@FeignClient(contextId = "remoteLoginService",value = ServiceNameConstants.AUTH_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) @FeignClient(contextId = "remoteLoginService",value = ServiceNameConstants.AUTH_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteLoginService { public interface RemoteLoginService {

@ -17,8 +17,8 @@ import com.ruoyi.system.api.model.LoginUser;
* *
* *
* IP访dockerurl访 * IP访dockerurl访
* lynn.server.local IP使hosts * kubernetes.docker.internal IP使hosts
* url = "http://lynn.server.local:9200/", * url = "http://kubernetes.docker.internal:9200/",
*/ */
@FeignClient(contextId = "remoteUserService",value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) @FeignClient(contextId = "remoteUserService",value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserService public interface RemoteUserService

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

@ -16,10 +16,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
@ -30,7 +30,7 @@ spring:
eager: true eager: true
transport: transport:
# 控制台地址 # 控制台地址
dashboard: 192.168.1.100:8718 dashboard: kubernetes.docker.internal:8718
# nacos配置持久化 # nacos配置持久化
datasource: datasource:
ds1: ds1:

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: lynn.server.local:8848 server-addr: kubernetes.docker.internal:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

Loading…
Cancel
Save