Skip to content

Minimal microservice for single module with basic CRUD operations using Java Springboot

License

Notifications You must be signed in to change notification settings

jawadkc/api-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-py

Minimal microservice for single module with basic CRUD operations using Java Springboot

How to Setup

Pre-requisites

mvn clean install

Start in Dev Mode

Run following commands

java -jar target/crud-api-microservice-0.0.1-SNAPSHOT.jar

To Test

To test run the following commands

# To get all data
curl localhost:8080/api/items

# To create new data
curl -X POST -H 'content-type:application/json' -d '{"name":"Example Item","price":10.99}' localhost:8080/api/items 

# To get specific Data based on id
# Replace :id with the value of id returned in above command
curl -X GET localhost:8080/api/items/:id

# To delete specific Data based on id
# Replace :id with the value of id returned in above command
curl -X DELETE localhost:8080/api/items/:id  #replace id with the value of id returned in above command

You can test the same using postman

About

Minimal microservice for single module with basic CRUD operations using Java Springboot

Topics

Resources

License

Stars

Watchers

Forks

Languages