- Clone this repository:
git clone https://github.com/hendisantika/springboot-ehcache-demo.git
- Navigate to the folder:
cd springboot-ehcache-demo
- Run the application:
mvn clean spring-boot:run
- Open your POSTMAN APP then import the file
Add New Employee
curl --location --request POST 'http://localhost:8080/employee' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Uchiha Sasuke",
"tech": "Tim 1"
}'
List All Employee
curl --location --request GET 'http://localhost:8080/employee' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Uzumaki Naruto",
"tech": "Tim 1"
}'
Find Employee By ID
curl --location --request GET 'http://localhost:8080/employee/1'
Evict the Cache
curl --location --request GET 'http://localhost:8080/employee/evict'