Java Jersey: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 11: | Line 11: | ||
== Maven == | == Maven == | ||
Jersey is complete maven build. Goto the directory where you wanna build the Jersey Simple Service | Jersey is complete maven build. The following is tested for OS/X and should work on Linux/Unix. Assumed is that you have installed maven successful and also have the right location for the m2 libraries. | ||
# Open Terminal | |||
# Goto the directory where you wanna build the Jersey Simple Service (i.e. /Sources/Java/Jersey/Refmaven) | |||
# Type: | |||
<pre> | <pre> | ||
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 \ | mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 \ |
Revision as of 20:06, 19 June 2015
Developing RESTful Web services that seamlessly support exposing your data in a variety of representation media types and abstract away the low-level details of the client-server communication is not an easy task without a good toolkit.
In order to simplify development of RESTful Web services and their clients in Java, a standard and portable JAX-RS API
[1]
[2]
has been designed. Jersey RESTful Web Services framework is open source, production quality, framework for developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation.
Jersey framework [3] is more than the JAX-RS Reference Implementation. Jersey provides it’s own API that extend the JAX-RS toolkit with additional features and utilities to further simplify RESTful service and client development. Jersey also exposes numerous extension SPIs so that developers may extend Jersey to best suit their needs.
Maven
Jersey is complete maven build. The following is tested for OS/X and should work on Linux/Unix. Assumed is that you have installed maven successful and also have the right location for the m2 libraries.
- Open Terminal
- Goto the directory where you wanna build the Jersey Simple Service (i.e. /Sources/Java/Jersey/Refmaven)
- Type:
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 \ -DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \ -DgroupId=com.example -DartifactId=simple-service -Dpackage=com.example \ -DarchetypeVersion=2.18
See also
Reference
- ↑ Wikipedia JAX API WS, Java API for XML Webservices.
- ↑ Wikipedai JAX RS, Java API for RESTful WebServices
- ↑ Jersey Homepage, Jersey