当前位置:网站首页>基于consul的注册发现的微服务架构迁移到servicemesh
基于consul的注册发现的微服务架构迁移到servicemesh
2022-08-11 08:30:00 【hhkun0120】
现有的服务架构,是基于consul、springcloud gateway的一套微服务架构,近期公司也是打算把所有的系统都迁移到servicemesh上,所以我们系统涉及到一次架构变更。
变更的内容如下
//@FeignClient(name = "pcms-uniquerypolicy", path = "pcms/uniquery/policyapp/rest")
//@FeignClient(name = "pcms-uniquerypolicy", url = "http://localhost:19001/pcms/uniquerypolicy/policyapp/rest")
//@FeignClient(name = "pcms-uniquerypolicy", path = "pcms/uniquerypolicy/policyapp/rest")
//@FeignClient(name = "pcms-uniquerypolicy",path = "http://10.30.59.14:9002/pcms/uniquerypolicy")
//@FeignClient(name = "testClient",path = "http://10.30.59.14:9002/pcms/uniquerypolicy/policyapp/rest")
//@FeignClient(value = "testClient",path = "http://10.30.59.14:9002/pcms/uniquerypolicy/policyapp/rest")
@FeignClient(name = "pcms-uniquerypolicy",url = "http://localhost:19001/pcms/uniquerypolicy/policyapp/rest")
public interface PolicyCbpsApi {
@RequestLine(value = "POST /stdContract/getStdContractBOList")
List<StdContractBO> getStdContractBOList(
@Param(value = "stdContractQRY") StdContractQRY stdContractQRY, @Param(value = "routeInfo") RouteInfo route);
}
//@FeignClient(name = "pcms-uniquery-gateway")
@FeignClient(name = "pcms-uniquery-gateway",url="http://localhost:19001")
public interface CpnstApi {
/**
* @throws
* @Title: getCpnstApplList
* @param: @param appl
* @param: @param sysNo
* @param: @param branchNo
* @param: @return
* @return: List<CpnstApplPO>
*/
@RequestMapping(value = ConstUtil.CONTEXT_PATH+"/cpnstAppl/getCpnstApplList", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
List<CpnstApplPO> getCpnstApplList(@RequestBody CpnstApplQRY appl, @PathVariable(value = "sysNo") String sysNo, @PathVariable(value = "branchNo") String branchNo);
}
public class ConstUtil {
private ConstUtil(){}
// public static final String CONTEXT_PATH="/pcms-uniquery{sysNo}{branchNo}/pcms/uniquery/{sysNo}-{branchNo}/daoapp/rest";
public static final String CONTEXT_PATH="/pcms/uniquery{sysNo}{branchNo}/{sysNo}-{branchNo}/daoapp/rest";
public static final String EXT_FLAG = "1"; // 附加险标识
}
- 之前用的FeignClient中的path匹配,path=contextPath+server.servlet.path,用于定义当前FeignClient的统一前缀
- 现在改为url,官方文档里面url的解释是 an absolute URL or resolvable hostname,绝对路径的url或者可解析的主机名。localhost:19001,网格中的默认端口,而后面两段定义的是rancher里面服务的系统名+service_name,最后两段是server.servlet.path
边栏推荐
猜你喜欢
机器学习(一)数据的预处理
The easiest trick to support quick renaming of various files
FPGA 20个例程篇:11.USB2.0接收并回复CRC16位校验
JUC Concurrent Programming
golang string manipulation
企业服务器主机加固现状分析
ASP.NET Core 6框架揭秘实例演示[32]:错误页面的集中呈现方式
租房小程序
Keep track of your monthly income and expenses through bookkeeping
Unity3D - modification of the Inspector panel of the custom class
随机推荐
One network cable to transfer files between two computers
磁盘管理:磁盘结构
The growth path of a 40W test engineer with an annual salary, which stage are you in?
【C语言】每日一题,求水仙花数,求变种水仙花数
The softmax function is used in TF;
Kotlin算法入门计算质因数
LoRa芯片的特征
AcWing 272. 最长公共上升子序列
零基础SQL教程: 基础查询 05
2022-08-10 mysql/stonedb-slow SQL-Q16-time-consuming tracking
VoLTE基础自学系列 | 3GPP规范解读之Rx接口(上集)
经典论文-MobileNet V1论文及实践
用 Antlr 重构脚本解释器
For the first time, I suspect that there is a bug in selenium4 because the iframe element is not found?
麒麟V10系统打包Qt免安装包程序
[C语言] sscanf如何实现sscanf_s?
优炫数据库支持多列分区吗?
几何EX3 功夫牛宣布停售,入门级纯电产品为何总成弃子
剑指offer专项突击版第26天
数据库无法启动,报无法分配内存,怎么处理