diff --git a/Ylt/gw-charge/src/main/resources/bootstrap-dev.yml b/Ylt/gw-charge/src/main/resources/bootstrap-dev.yml index 30a9e31..71b64cc 100644 --- a/Ylt/gw-charge/src/main/resources/bootstrap-dev.yml +++ b/Ylt/gw-charge/src/main/resources/bootstrap-dev.yml @@ -2,7 +2,6 @@ jwt: # 密钥 secret: ZXZnZWVr5b+r5LmQ5L2g55qE5Ye66KGM filter: - # 似乎是白名单,需要看完源码再说 TODO should_not_filter: - /gw/login - /userapi/getOpenId @@ -51,8 +50,6 @@ zuul: # UserInfoController # @RequestMapping("/userapi/user") userapi: - # spring cloud gateway的stripPrefix配置 - # https://www.jianshu.com/p/6d6b8c148881 stripPrefix: false path: /userapi/** # 所有匹配/usrerapi/**的路径将被路由到/userapi/** # sensitiveHeaders是黑名单,且默认不为空。 因此,要使Zuul发送所有标头(忽略的标头除外),您必须将其明确设置为空列表。 如果要将cookie或授权标头传递到后端,则必须这样做。 @@ -111,50 +108,54 @@ zuul: # D:\dsWork\YltProject\Ylt\ms-user\src\main\java\com\charge\rpc\web\UserRpcApiController.java userapi: ribbon: - #listOfServers: http://i100c.3322.org:32150 - listOfServers: http://127.0.0.1:7022 + listOfServers: http://ms-user:7022 # 订单后台模块 orderbkapi: ribbon: - listOfServers: http://127.0.0.1:7011 + listOfServers: http://ms-admin:7011 #分发模块 distribute: ribbon: - listOfServers: http://i100c.3322.org:31636 + listOfServers: http://ms-distribute:7012 # 财务模块 financeapi: ribbon: - listOfServers: http://i100c.3322.org:32134 + listOfServers: http://ms-finance:7014 + +# 充电站模块 +stationapi: + ribbon: + listOfServers: http://ms-station:7020 + +# 协议模块 +protocolapi: + ribbon: + listOfServers: http://ms-protocol:7024 # 通知模块 -noticeapi: +cheweiapi: ribbon: - listOfServers: http://i100c.3322.org:30745 + listOfServers: http://cz.api.cheweiguanjia.com # 互联互通模块 openapi: ribbon: - listOfServers: http://i100c.3322.org:31301 - -# 订单模块 -orderapi: - ribbon: - listOfServers: http://i100c.3322.org:30258 + listOfServers: http://ms-openapi:7016 -# 充电站模块 -stationapi: +# 通知模块 +noticeapi: ribbon: - listOfServers: http://i100c.3322.org:30836 + listOfServers: http://i100c.3322.org:30745 -# 通知模块 -cheweiapi: - ribbon: - listOfServers: http://cz.api.cheweiguanjia.com +# 订单模块 +#orderapi: +# ribbon: +# listOfServers: http://i100c.3322.org:30258 #protocolshenghongapi: @@ -165,7 +166,6 @@ cheweiapi: # ribbon: # listOfServers: http://i100c.3322.org:31960 - #walletapi: # ribbon: # listOfServers: http://i100c.3322.org:30723 @@ -183,8 +183,6 @@ cheweiapi: # listOfServers: http://i100c.3322.org:30326 -# springcloud系列9——Ribbon脱离Eureka使用 -# https://blog.csdn.net/qincidong/article/details/82711648 ribbon: #负载均衡 eureka: enabled: false #禁用eureka,不依赖 eureka @@ -202,7 +200,7 @@ hystrix: #熔断 enabled: true #配置HystrixCommand的执行是否启用超时时间 isolation: thread: - timeoutInMilliseconds: 8000 #配置HystrixCommand执行的超时时间,执行超过该时间会进行服务降级处理 8s + timeoutInMilliseconds: 80000 #配置HystrixCommand执行的超时时间,执行超过该时间会进行服务降级处理 80s # 配置连接到Redis spring: diff --git a/Ylt/gw-charge/target/classes/bootstrap-dev.yml b/Ylt/gw-charge/target/classes/bootstrap-dev.yml index 30a9e31..71b64cc 100644 --- a/Ylt/gw-charge/target/classes/bootstrap-dev.yml +++ b/Ylt/gw-charge/target/classes/bootstrap-dev.yml @@ -2,7 +2,6 @@ jwt: # 密钥 secret: ZXZnZWVr5b+r5LmQ5L2g55qE5Ye66KGM filter: - # 似乎是白名单,需要看完源码再说 TODO should_not_filter: - /gw/login - /userapi/getOpenId @@ -51,8 +50,6 @@ zuul: # UserInfoController # @RequestMapping("/userapi/user") userapi: - # spring cloud gateway的stripPrefix配置 - # https://www.jianshu.com/p/6d6b8c148881 stripPrefix: false path: /userapi/** # 所有匹配/usrerapi/**的路径将被路由到/userapi/** # sensitiveHeaders是黑名单,且默认不为空。 因此,要使Zuul发送所有标头(忽略的标头除外),您必须将其明确设置为空列表。 如果要将cookie或授权标头传递到后端,则必须这样做。 @@ -111,50 +108,54 @@ zuul: # D:\dsWork\YltProject\Ylt\ms-user\src\main\java\com\charge\rpc\web\UserRpcApiController.java userapi: ribbon: - #listOfServers: http://i100c.3322.org:32150 - listOfServers: http://127.0.0.1:7022 + listOfServers: http://ms-user:7022 # 订单后台模块 orderbkapi: ribbon: - listOfServers: http://127.0.0.1:7011 + listOfServers: http://ms-admin:7011 #分发模块 distribute: ribbon: - listOfServers: http://i100c.3322.org:31636 + listOfServers: http://ms-distribute:7012 # 财务模块 financeapi: ribbon: - listOfServers: http://i100c.3322.org:32134 + listOfServers: http://ms-finance:7014 + +# 充电站模块 +stationapi: + ribbon: + listOfServers: http://ms-station:7020 + +# 协议模块 +protocolapi: + ribbon: + listOfServers: http://ms-protocol:7024 # 通知模块 -noticeapi: +cheweiapi: ribbon: - listOfServers: http://i100c.3322.org:30745 + listOfServers: http://cz.api.cheweiguanjia.com # 互联互通模块 openapi: ribbon: - listOfServers: http://i100c.3322.org:31301 - -# 订单模块 -orderapi: - ribbon: - listOfServers: http://i100c.3322.org:30258 + listOfServers: http://ms-openapi:7016 -# 充电站模块 -stationapi: +# 通知模块 +noticeapi: ribbon: - listOfServers: http://i100c.3322.org:30836 + listOfServers: http://i100c.3322.org:30745 -# 通知模块 -cheweiapi: - ribbon: - listOfServers: http://cz.api.cheweiguanjia.com +# 订单模块 +#orderapi: +# ribbon: +# listOfServers: http://i100c.3322.org:30258 #protocolshenghongapi: @@ -165,7 +166,6 @@ cheweiapi: # ribbon: # listOfServers: http://i100c.3322.org:31960 - #walletapi: # ribbon: # listOfServers: http://i100c.3322.org:30723 @@ -183,8 +183,6 @@ cheweiapi: # listOfServers: http://i100c.3322.org:30326 -# springcloud系列9——Ribbon脱离Eureka使用 -# https://blog.csdn.net/qincidong/article/details/82711648 ribbon: #负载均衡 eureka: enabled: false #禁用eureka,不依赖 eureka @@ -202,7 +200,7 @@ hystrix: #熔断 enabled: true #配置HystrixCommand的执行是否启用超时时间 isolation: thread: - timeoutInMilliseconds: 8000 #配置HystrixCommand执行的超时时间,执行超过该时间会进行服务降级处理 8s + timeoutInMilliseconds: 80000 #配置HystrixCommand执行的超时时间,执行超过该时间会进行服务降级处理 80s # 配置连接到Redis spring: diff --git a/操作文档/8、配置文件设置技巧.md b/操作文档/8、配置文件设置技巧.md index 3f4e0d9..163ab8a 100644 --- a/操作文档/8、配置文件设置技巧.md +++ b/操作文档/8、配置文件设置技巧.md @@ -8,7 +8,7 @@ C:\Windows\System32\drivers\etc\hosts ``` # 以下是微服务的服务器配置 -10.10.21.19 ms-saas-mgr +10.10.14.67 ms-saas-mgr 10.10.21.20 ms-user 10.10.21.20 ms-finance 10.10.21.20 ms-wallet @@ -21,7 +21,8 @@ C:\Windows\System32\drivers\etc\hosts 10.10.21.20 ms-monitor 10.10.21.20 ms-openapi 10.10.21.20 ms-task -10.10.21.10 ms-websocket-ocpp +10.10.21.20 ms-websocket-ocpp +10.10.21.20 ms-protocol ``` #### 映射的端口 diff --git a/操作文档/驿来特代码模块依赖图.xmind b/操作文档/驿来特代码模块依赖图.xmind index 1b2a28d..8751a1d 100644 Binary files a/操作文档/驿来特代码模块依赖图.xmind and b/操作文档/驿来特代码模块依赖图.xmind differ