Cake-Manager service have the following functionalities:
- Add a new cake
- Update an existing cake
- Delete an existing cake
- Get an existing cake
- Get all cakes
Application uses H2 InMemory database. Data updates will be cleared when the application is restarted.
Application uses InMemoryUserDetail for application authentication and authorisation.
- Below user can only access get APIs (Get All Cakes and Get Cake By Id)
username: 'user',
password: 'password',
roles: 'USER'
- Admin user have access to get, create, update, delete APIs
username: 'admin',
password: 'password',
roles: ('USER', 'ADMIN')
-
Initial static data: Application loads the static data from json file to H2 database at the application startup cakes.json
-
Run application locally in terminal
./gradlew bootRun
- Run the application in a docker container locally
docker-compose up -d
- Build the application using Jenkinsfile. Currently there are 3 stages setup in Jenkinsfile Build, Test and Deploy. Docker registry details and user credentials for docker registry needs updatating in Jenkinsfile to execute the deploy stage.