The Java API for RESTful Web Services provides portable APIs for developing, exposing and accessing Web applications designed and implemented in compliance with principles of REST architectural style.
base_url
is http:https://localhost/restapp/api
Back End Database is MySQL
database;
-
Import this (maven) repository into any Java EE IDE with Tomcat Installed.
-
Import
src/main/resources/friends.sql
in anymysql
database; -
Change
mysql
configuration insrc/main/resources/mysql.properties
. -
Run
Maven Clean
through IDE or Command Line. -
Run on Tomcat Server or
maven install
and copytarget/restapp.war
into$TOMCAT/webapps/
directory.
Add chrome extension Postman which is a REST Api Client to test this application.
HTTP Method | Path | Action | Fields |
---|---|---|---|
GET | /users | index | |
GET | /users/{user_id} | index | |
POST | /users | Add | rollno (int), name, email, phone and company with header Content-Type: application/x-www-form-urlencoded |
PUT | /users/{user_id} | update | rollno (int), name, email, phone and company with header Content-Type: application/x-www-form-urlencoded |
DELETE | /users/{user_id} | destroy |
- Add OAuth 2.0 Support