CWIKIUS
  • 首页
  • 计算科学
  • 房地产
  • 文化旅游
  • 项目和网站
    • OSSEZ 计算技术
    • USRealEstate 社区
    • 地区文化
    • CWIKI.US
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
CWIKIUS.CN
一个有独立思考和温度的清新站
  1. Home
  2. Computer Science
  3. Jersey
  4. This article

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

2018年11月06日 533Browse 0Like 0Comments

如果你使用的是 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

Tags: Jersey
Last updated:2018年11月06日

HoneyMoose

有温度的人文和独立的思考

Like
< Previous
Next >

Comments

Cancel reply

Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • U.S. Travel
  • USRealEstate
  • VisaFn

COPYRIGHT © 2020 CWIKIUS. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS

湘ICP备2020018253号-1