前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Jersey 2.x Glassfish 中基于 Servlet 的应用

Jersey 2.x Glassfish 中基于 Servlet 的应用

作者头像
HoneyMoose
发布2019-01-30 10:53:31
4490
发布2019-01-30 10:53:31
举报
文章被收录于专栏:CWIKIUSCWIKIUS

如果你使用的是 Glassfish 作为你应用服务器,你不需要在你的引用中包含引用任何东西,所有你需要的都已经包含进去了。

你只需要定义 JAX-RS API 以便于你能够对你的应用进行编辑,使用 (provided)依赖。

1 2 3 4 5 6

<dependency>     <groupId>javax.ws.rs</groupId>     <artifactId>javax.ws.rs-api</artifactId>     <version>2.1</version>     <scope>provided</scope> </dependency>

如果你需要使用 Jersey 的一些特定特性,你需要基于你的 Jersey 目录进行添加。

1 2 3 4 5 6 7 8 9 10 11 12 13

<dependency> <groupId>org.glassfish.jersey.containers</groupId> <artifactId>jersey-container-servlet</artifactId> <version>2.27</version> <scope>provided</scope> </dependency> <!-- if you are using Jersey client specific features without the server side --> <dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-client</artifactId> <version>2.27</version> <scope>provided</scope> </dependency>

https://www.cwiki.us/display/JERSEYZH/Common+Jersey+Use+Cases

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018/11/07 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档