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)