当前位置:网站首页>基于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
边栏推荐
猜你喜欢

零基础SQL教程: 基础查询 05

The growth path of a 40W test engineer with an annual salary, which stage are you in?

机器学习(一)数据的预处理

One network cable to transfer files between two computers

【TA-霜狼_may-《百人计划》】图形3.7.2 command buffer简

flex布局回顾
1.2 - error sources

Machine Learning Summary (2)

Keep track of your monthly income and expenses through bookkeeping

Project 1 - PM2.5 Forecast
随机推荐
OAuth Client默认配置加载
Kotlin Algorithm Getting Started with Rabbit Number Optimization and Expansion
【415. 字符串相加】
2022 China Soft Drink Market Insights
欧拉函数(用欧拉筛法求欧拉函数)
Kotlin算法入门计算质因数
2022-08-10 mysql/stonedb-slow SQL-Q16-time-consuming tracking
一根网线两台电脑传输文件
【实战系列】OpenApi设计规范
零基础SQL教程: 主键、外键和索引 04
【C语言】每日一题,求水仙花数,求变种水仙花数
C语言-结构体
The growth path of a 40W test engineer with an annual salary, which stage are you in?
Getting Started with Kotlin Algorithm to Calculate the Number of Daffodils
你有对象类,我有结构体,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang结构体(struct)的使用EP06
Features of LoRa Chips
Filesystem Hierarchy Standard
opengauss创建用户权限问题
Kotlin算法入门兔子数量优化及拓展
Interaction of Pico neo3 in Unity