Java RESTful framework: Jersey Getting Started example (official example)

Source: Internet
Author: User

This article mainly introduces the Java RESTful Framework jersey Introduction Example (from the official website https://jersey.java.net/), the nonsense does not say much to enter the topic.

In the Jersey official example (https://jersey.java.net/documentation/latest/getting-started.html), the Getting started example is primarily built with Maven, where Eclipse is used to create our project

1. Create a project using the Maven skeleton method, e.g.,

2, if there is no above option in eclipser, we need to manually add jersey Maven skeleton, click the Add Archetype button in the bottom, pop up as, and then fill in the box with the corresponding information

The above information is from the official introductory example (https://jersey.java.net/documentation/latest/getting-started.html)

3, check the skeleton, and then click Next, fill in GroupID, Artifact Id, version and package information, our project was created.

4, after the creation of a good project, we can see the official example, there are mainly two classes Main.java and Myresource.java, of which Myresource.java is our restful resources, Main.java is to start restful services to

5, after running Main.java, enter Http://localhost:8080/myapp/myresource in the browser, you can see the following two words



Source:http://minglisoft.cn/technology

Interested friends can go to the ball Oh ~ Share learning technology:2042849237

Java RESTful framework: Jersey Getting Started example (official example)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.