Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Example project of a REST web project done in standard JavaEE

Notifications You must be signed in to change notification settings

romulohandall/JavaEE-REST-Example

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

REST API Example with Wildfly

Usage

Download Wildfly.

Uncompress it.

Start WildFly:

./wildfly-8.2.0.Final/bin/standalone.sh

Compile, test and deploy this project:

 mvn clean package test wildfly:deploy

In the main path you will find your normal web project. In this case you have a REST Console so that you can play with the REST API: http://localhost:8080/RESTExample/

In the /api/ you find the root path where all the API is located for all the services. For now there's only one service, that is the purchase simulation: http://localhost:8080/RESTExample/api/

The service for the purchase simulation is in the /api/decision/ So far there's only two operations supported: GET and POST.

GET on the main path of /api/decisions/ will return all the users. GET on a concrete user will return the current balance of that user: RESTExample/api/decision?email=ed@gmail.com

POST : You can add a new purchase for a new user that will be identified by its email. It expects a JSON object with the following format: {"email":"ed@gmail.com","first_name":"Eduard","last_name":"Cespedes","amount":300}

Contributors

License

BSD. See the LICENSE file at the root of this repository.

About

Example project of a REST web project done in standard JavaEE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.