Test project for Java 8 with Maven secured by OAuth2 with basic UI provided by JSP (front-end is not in the scope of this project).
- Spring MVC (exposes REST api)
- Spring Security (OAuth2 tokens)
- Spring Data (set for H2)
- Spring Boot (contains its own web container)
- Spring application events
- H2 (custom configured in-memory database)
- Hazelcast (to enable cache)
- JSP & Thymeleaf (basic UI)
- MapStruct (mappign TO and entities)
- Swagger (app exposes its own API blueprint)
- Docker (contains Dockerfile to deploy in Java-based Docker container)
- and others..
Exposed at /v2/api-docs
- /
- /customers
- /v2/api-docs
Authorization server has in-memory client with following credentials
- Id: "ClientId"
- secret: "secret
- auth grand type: "password"
- scope: read & write
Application starts up with default user in database
- username: david
- password: david
Authorization server grands tokens at /oauth/token
cUrl command
curl -X POST \
'<host>/oauth/token?grant_type=password&username=david&password=david' \
-H 'authorization: Basic Q2xpZW50SWQ6c2VjcmV0'
obtained token then send as param, i.e.:
<host>/customers?access_token=cfed3699-d095-4980-baa5-8e33bf7c201d