删除了服务堆栈同步回复,不向后兼容? [英] servicestack syncreply removed, not backwards compatible?

查看:41
本文介绍了删除了服务堆栈同步回复,不向后兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在升级到 servicestack v4,并注意到默认的SyncReply"路由已被移除以支持Reply".我们的客户在我们的服务中积极使用这些端点.为这些客户实现向后兼容性的推荐方法是什么,而不必为每个内容类型+服务手动注册路由?

We're in the process of upgrading to servicestack v4 and noticed that the default "SyncReply" route was removed in favor of "Reply". We have customers who are actively using these endpoints in our services. What is the recommended way to achieve backwards compatibility for these customers, without having to manually register the routes for each content-type+service?

推荐答案

您可以通过使用 UseNewPredefinedRoutes 属性来使用指向 v4 服务器的 v3 客户端,前提是在线接口保持不变.如您所知,v4 更改了内置路由,通过设置上述属性,v3 客户端将使用新的 v4 路由.

You can use v3 clients that point to a v4 server by using the UseNewPredefinedRoutes property, provided that the over-the-wire interface stays the same. As you're aware v4 has changed the built in routes, and by setting the above mentioned property the v3 clients will use the new v4 routes.

var client = new JsonServiceClient("http://...");
client.UseNewPredefinedRoutes = true;

这篇关于删除了服务堆栈同步回复,不向后兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆