https://github.com/hellokoding/restfulapi-springboot-mockmvc-vuejs
Restful API example with Spring Boot, Integration Test with MockMVC, UI Integration with VueJS
https://github.com/hellokoding/restfulapi-springboot-mockmvc-vuejs
Last synced: about 1 month ago
JSON representation
Restful API example with Spring Boot, Integration Test with MockMVC, UI Integration with VueJS
- Host: GitHub
- URL: https://github.com/hellokoding/restfulapi-springboot-mockmvc-vuejs
- Owner: hellokoding
- Created: 2018-03-24T03:37:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-01T06:59:39.000Z (over 6 years ago)
- Last Synced: 2025-04-01T15:10:03.065Z (3 months ago)
- Language: Java
- Homepage: https://hellokoding.com/restful-apis-example-with-spring-boot-integration-test-with-mockmvc-ui-integration-with-vuejs/
- Size: 9.77 KB
- Stars: 6
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Restful API example with Spring Boot, Integration Test with MockMVC, UI Integration with VueJS
### Guide
https://hellokoding.com/restful-apis-example-with-spring-boot-integration-test-with-mockmvc-ui-integration-with-vuejs/### Stack
- Spring Boot
- Java 8
- Maven 3
- Integration test
- VueJS### Tools you need
- Java 8
- Maven 3### Build and run
`mvn clean spring-boot:run`### Run the tests only
`mvn clean verify`### Test the APIs
- Get all stocks `curl http://localhost:8080/api/v1/stocks`
- Get stock 1 `curl http://localhost:8080/api/v1/stocks/1`
- Update price of stock 1 `curl -X PUT -d 'currentPrice=123' http://localhost:8080/api/v1/stocks/1`
- Create a new stock `curl -H "Content-Type: application/json" -X POST -d '{"name":"S11","currentPrice":"11"}' http://localhost:8080/api/v1/stocks`
- Stock list front end: access to `http://localhost:8080`