{"id":23067069,"url":"https://github.com/dvsa/appdev-java11-starter-template","last_synced_at":"2025-04-03T09:14:03.978Z","repository":{"id":172767125,"uuid":"577469131","full_name":"dvsa/appdev-java11-starter-template","owner":"dvsa","description":"SMC Java 11 Starter Template","archived":false,"fork":false,"pushed_at":"2023-07-25T12:12:28.000Z","size":84,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-08T22:28:36.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvsa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-12T20:08:00.000Z","updated_at":"2024-07-25T07:10:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"85145d8d-470e-4b9c-a07b-3ef645b8325d","html_url":"https://github.com/dvsa/appdev-java11-starter-template","commit_stats":null,"previous_names":["dvsa/appdev-java11-starter-template"],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fappdev-java11-starter-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fappdev-java11-starter-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fappdev-java11-starter-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvsa%2Fappdev-java11-starter-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvsa","download_url":"https://codeload.github.com/dvsa/appdev-java11-starter-template/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970323,"owners_count":20862509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T05:16:03.198Z","updated_at":"2025-04-03T09:14:03.954Z","avatar_url":"https://github.com/dvsa.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java 11 Starter Template\n\n---\n\nThis repository contains the JAVA code for a working Java 11 starter project.  Key points are:\n\n  - Java 11 (AWS Corretto).\n  - The project is based on Maven.\n  - Uses the smc-api-lib package.\n  - AWS Labs Serverless-Containers are used to integrate with AWS API Gateway.\n  - Routing is handled through Jersey.\n  - Responses with Jackson.\n  - Dagger for dependency injection.\n\n## AWS SnapStart\nThis code is optimised to support [AWS SnapStart](https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html).  The ApplicationHandler implements the Coordinated\nRestore at Checkpoint (CraC) wrapper, allowing code to be pre-compiled at the time of Snapshot for\nimproved performance to eliminate cold starts.\n\n## Pre-requisite\n\nYou will need to install the following tools to make sure you have the required security checks in place:\n\n- [git-secrets](https://github.com/awslabs/git-secrets)\n- [repo-security-scanner](https://github.com/UKHomeOffice/repo-security-scanner)\n- [snyk-cli](https://docs.snyk.io/snyk-cli/install-the-snyk-cli)\n\n## Getting Started\n\nPull repository:\n```shell\ngit clone git@github.com:dvsa/smc-java11-starter-template.git\n```\n\n## Java 11\nMake sure to change your Java home\n```\nexport JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home\n```\n\nThe following must be added to your VM options:\n```\n-ea -Duser.timezone=UTC --add-opens java.base/java.lang=ALL-UNNAMED\n```\n\n## Configuration\nA settings.yaml file must be created under the /config folder in this\nproject. Populate that file with the following configuration:\n\n    # Starter Template API Service\n    # Configuration settings allowing Maven to deploy the application to the Development environment.\n    # Use the EnvFile plugin from IntelliJ to use it locally.\n    # --------------------------------------------------------------------------------------------------------------------\n    \n    # Environment definition so the JarFile knows where its being run. Certain security options are turned off in Dev\n    environment: development\n    \n    # Secret Key to retrieve values from AWS Secrets Manager\n    secretkey: [populate as appropriate]\n\n    # Application client ID from Azure\n    azure_client_id: [populate as appropriate]\n\n    # DVSA Azure Tenant ID\n    azure_tenant_id: [populate as appropriate]\n\n## Running The API Locally\n- Create the config directory and `settings.yaml` file\n- Run the JettyLocalRunner class (use the IntelliJ [Env plugin](https://plugins.jetbrains.com/plugin/7861-envfile) to point to the config.yaml file)\n  - Update VM options as specified above\n- Using [Postman](https://www.postman.com) hit the two example end-points\n  - `localhost:8000/1.0/version`\n  - `localhost:8000/1.0/helloworld`\n- Standard debugging is possible anywhere within the code just add a breakpoint\n\n## Maven Commands\nUse the following Maven commands to run various project Lifecycle Goals:\n\n| Goal            | Command                               | Description                                                   |\n|-----------------|---------------------------------------|---------------------------------------------------------------|\n| **Test**        | ```mvn clean test```                  | *Run the jUnit tests only*                                    |\n| **Swagger**     | ```mvn clean compile```               | *Generates the ```swagger.json``` file*                       |\n| **Sonar**       | ```mvn clean test sonar:sonar```      | *Generate coverage reports and sends to the SonarQube server* |\n| **Build**       | ```mvn clean package```               | *Runs the tests and builds the zip*                           |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvsa%2Fappdev-java11-starter-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvsa%2Fappdev-java11-starter-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvsa%2Fappdev-java11-starter-template/lists"}