Explore Java Springboot Framework with Oauth2 scenario unit testing using TestRestTemplate & MockMVC. For making assertions in JUnit I choose Hamcrest.
- Java 8
- JPA Mysql
- Gradle
- Oauth2
- Dev Tools
- Lombok
- Swagger
- MockMVC
- TestRestTemplate
- Hamcrest
Import import-dev.sql to your MySQL
Import Buku_Oauth.postman_collection to Postman
Open your browser for SpringFox http://localhost:8200/api/v2/api-docs
Open your browser for Swagger UI http://localhost:8200/api/swagger-ui.html#/
To run application,open cmd in your project directory and type
gradlew bootRun
To run unit testing,open cmd in your project directory and type
gradlew clean test --info
For those who having this problem in Eclipse:
Type this command:
gradle wrapper --gradle-version 7.1.1 --distribution-type all