Examples jersey + maven + eclipse

A link to verify through demo with source code can be used directly: https://www.mkyong.com/webservices/jax-rs/jersey-hello-world-example/  

Links Second, create a demo, the effect of the same manual: https://needhamia.com/how-to/java-software-development/create-a-jersey-web-project-using-maven-tomcat-and-eclipse/

 

By linking the two methods the following ideas can be seen, the use of third party integration framework maven eclipse, there are two methods.

First, using the new eclipse maven project, Archetype and select third-party frameworks, and automatically generate project directory, without having to manually create.

Second, the use of third party maven download source frame, then use mvn eclipse: eclipse -Dwtpversion = 2.0, eclipse directory generation, and then introduced into the eclipse. Ideas such as a link operation.

Third, create a directory manually, if it is a web project, first create a maven project in eclipse, and then follow the prototype to create a basic web project directory maven-archetype-webapp, and then manually filled catalog maven, ideas such as links two.

 

Summary: maven primarily used to manage third-party libraries, the main library is loaded (buildpath) and version control, if it is a web project, the project needs to meet first web project directory, there are webapp, resource and other documents web.xml and then based on this foundation, and then meet maven directory, there are src / main / java, src / main / resource directories, etc., (the menu can make use of eclipse, maven-update project to help generate or manually created).

Guess you like

Origin www.cnblogs.com/faster/p/11306530.html