Demo Project Done for tenlegs
It is a REST-ful API written using JAX-WS. There is a key component that is missing config.properties
it should be a text file containing the following.
driver='appropriate driver for the chosen database'
url='jdbc complete url with database specified'
user=username
pass=password
the config.properties must be located in the src folder
Import the project into Spring Tool Suite or Eclipse and run it on tomcat or any other server of your choice.
The entire project can be exported into a .war file that can be deployed into any supported webserver.
The application has been built into a Docker container and can be pulled
The API has been deployed at api.agrimasthana.com/tenlegs/user/ with basic GET , PUT , POST , DELETE methods
that can be seen in UserController.java
Except for GET requests all other requests need the request header 'Content-Type' to be set to 'application/json'
Method | Input | Output |
---|---|---|
GET /user/ | none | List of all users |
GET /user/1 | none | details of user with id 1 |
POST /user/ | JSON object of user with date_joined optional | HTTP 201 |
PUT /user/ | JSON object of exiting user with valid id | HTTP 200 |
DELETE /user/2 | none | HTTP 200 |