简体   繁体   English

支持多种版本的Web服务

[英]Supporting multiple versions of web-services

I have web-services implemented with Dropwizrad. 我有使用Dropwizrad实现的Web服务。 These web-services are being developed for an mobile app. 这些网络服务正在为移动应用程序开发。 Consider a scenarios where version 1.0 of the application is out, multiple users are accessing it. 考虑一种情况,其中应用程序的版本1.0出局,多个用户正在访问它。 Now there major changes to be done to web-services which will be compatible with only new version of the application. 现在,将对Web服务进行重大更改,这些更改仅与该应用程序的新版本兼容。 To tackle this I will have to host two versions of web-services, one for the legacy users and other for the latest version of the application. 为了解决这个问题,我将必须托管两种版本的Web服务,一种用于旧用户,另一种用于应用程序的最新版本。 Is there any way I can run different versions of the same web-services in the same container . 有什么办法可以在同一个容器中运行同一个Web服务的不同版本 So that clients could make choice between the the version of web-services to be user more like 这样客户可以在网络服务的版本之间进行选择,以使用户更喜欢

http://myHost/web-services-v1 http:// myHost / web-services-v1

http://myHost/web-services-v2 http:// myHost / web-services-v2

只要Web服务独立存在于自己的webapp(war文件)中,并具有自己的依赖关系( WEB-INF/classesWEB-INF/lib ),那么您就可以在2个不同的上下文根目录上运行2个单独的webapp,并且没人会彼此意识到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM