简体   繁体   English

WSO2应用程序服务器-REST服务,作为应用程序还是服务进行部署?

[英]WSO2 Application Server - REST Service, deploy as Application or Service?

If I have some functionality I want to expose via REST in the WSO2 Application Server and it seems that I have two main choices: 如果我有一些功能,我想通过WSO2 Application Server中的REST公开,看来我有两个主要选择:

  • Deploy as a JAX-RS Application 部署为JAX-RS 应用程序
  • Deploy as a Service 部署为服务

When deploying as a service, it appears that I have options for Quality of Service that don't appear to be available for Applications. 部署为服务时,似乎我有一些“服务质量”选项,这些选项似乎不适用于“应用程序”。

Question : If I am creating a REST based functionality from scratch, should I prefer to design as a service rather than as an application, because the service has more flexibility? 问题 :如果我要从头开始创建基于REST的功能,我是否应该将其设计为服务而不是应用程序,因为该服务具有更大的灵活性?

In WSO2 Application Server there are two approaches to create RESTfull services. 在WSO2 Application Server中,有两种创建RESTfull服务的方法。

  1. Create RESTfull service using Axis2, then you should deploy them as "service" 使用Axis2创建RESTfull服务,然后将它们部署为“服务”
  2. Create JAX-RS spec based service using CXF, then you should deploy them as "JAX-RS" applications. 使用CXF创建基于JAX-RS规范的服务,然后应将其部署为“ JAX-RS”应用程序。

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

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