entitlements-v2-jdbc is a [Spring Boot](https://spring.io/projects/spring-boot) service which hosts CRUD APIs that enable management of user entitlements.
Data kept in GCP instance of Postgres database.
### Database structure
The database used in this implementation is PostgreSQL 13.0. The database structure and additional
info can be found [here][JDBC documentation].
### Requirements
In order to run this service from a local machine to Cloud Run, you need the following:
| `DOMAIN` | ex `opendes.com` | The name of the domain for which the service runs | no | -- |
| `PARTITION_API` | ex `http://localhost:8080/api/partition/v1` | Partition service endpoint | no | - |
| `server_port` | ex `8080` | Port of the server | no | -- |
| `GOOGLE_AUDIENCES` | ex `*****.apps.googleusercontent.com` | Client ID for getting access to cloud resources | yes | https://console.cloud.google.com/apis/credentials |
| `GOOGLE_APPLICATION_CREDENTIALS` | `********` | Need this only if running locally, this service acc must have token sign access | yes | -- |
### Build and run the application
After configuring your environment as specified above, you can follow these steps to build and run the application. These steps should be invoked from the *repository root.*
```bash
# build + test + install core service code
$ ./mvnw clean install
# run service
#
# Note: this assumes that the environment variables for running the service as outlined
Jet Brains - the authors of Intellij IDEA, have written an [excellent guide](https://www.jetbrains.com/help/idea/debugging-your-first-java-application.html) on how to debug java programs.