https://github.com/dashorst/jaxrs-quickstart-resteasy
Quick start for JAX-RS projects using RestEasy and Jetty
https://github.com/dashorst/jaxrs-quickstart-resteasy
Last synced: 13 days ago
JSON representation
Quick start for JAX-RS projects using RestEasy and Jetty
- Host: GitHub
- URL: https://github.com/dashorst/jaxrs-quickstart-resteasy
- Owner: dashorst
- License: mit
- Created: 2013-08-14T15:07:36.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-23T16:07:37.000Z (almost 13 years ago)
- Last Synced: 2025-10-25T05:38:03.677Z (9 months ago)
- Language: Java
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
resteasy-quickstart
===================
This is a base project to quickly test concepts for JAX-RS using
Resteasy and Jetty.
It contains a Start class that configures jetty correctly and has
Maven configured such that RestEasy will automatically find your REST
resources.
Getting started
---------------
Perform a git clone of the repository and remove the git bits:
git clone https://github.com/dashorst/jaxrs-quickstart-resteasy.git
cd jaxrs-quickstart-resteasy
rm -rf .git
Now you can import the project into your favorite IDE, use the Maven
integration to import the POM file.
Configured Resource
-------------------
This project has one resource configured called `HelloResource`, and it
can be found in `src/main/java` in the package
`com.martijndashorst.quickstarts.resteasy`.
Running the Project
-------------------
To run the project use the `Start` class located in the `src/test/java`
folder. This will start the embedded Jetty container and make the REST
resources available at port 8080 of localhost.
You can use for example your browser to retrieve the root resource:
http://localhost:8080
This should retrieve a plain text string:
Hello, World!
If run using the `curl` command you should expect the following output:
$ curl http://localhost:8080 --verbose
> GET / HTTP/1.1
> User-Agent: curl/7.24.0
> Host: localhost:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain
< Content-Length: 13
< Server: Jetty(8.1.12.v20130726)
<
< Hello, World!
Have fun!