没有注释的 Rest Web 服务?
是否可以为现有 API 创建 Restful Web 服务,而无需向 POJO(java 类)添加注释?可以用球衣吗?或者另一个 JAX-RS 实现?问题是我的类上有太多注释,并且在处理复杂数据类型时需要添加一些适配器。
Is it possible to create a Restful webservice for an existing API without having to add annotations to POJOs (java classes)? Is it possible with jersey? or another JAX-RS implementation? The problem is that i am just having too much annotations on my classes and need to add some adapters when dealing with complex data types.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当然还有其他不依赖注释的 RESTful 资源发布方法和库,例如 Restlet。查看 JAX-RS 规范,它似乎定义的只是注释。如果您不使用注释,则您不再使用 JAX-RS。
There are certainly other approaches and libraries for publishing RESTful resources that don't rely on annotations such as Restlet for instance. Looking at the JAX-RS specification it seems that all it defines are the annotations. If you don't use the annotations, you aren't using JAX-RS anymore.