This application is responsible for handling all messages sent from the Employment Tribunals CCD Callbacks Service.
The project uses Gradle as a build tool but you don't have to install it locally since there is a
./gradlew
wrapper script.
To build project please execute the following command:
./gradlew build
To get the project to build in IntelliJ IDEA, you have to:
- Install the Lombok plugin: Preferences -> Plugins
- Enable Annotation Processing: Preferences -> Build, Execution, Deployment -> Compiler -> Annotation Processors
Running the application is best achieved by setting up an environment containing all dependencies.
Two options are available:
- CFTLIB created with et-ccd-callbacks
- ecm-ccd-docker
The following environment variables are required for a development connection to Azure Service Bus queues.
- CREATE_UPDATES_QUEUE_NAME
- UPDATE_CASE_QUEUE_NAME
- CREATE_UPDATES_QUEUE_SEND_CONNECTION_STRING
- CREATE_UPDATES_QUEUE_LISTEN_CONNECTION_STRING
- UPDATE_CASE_QUEUE_SEND_CONNECTION_STRING
- UPDATE_CASE_QUEUE_LISTEN_CONNECTION_STRING
./gradlew bootRun --args='--spring.profiles.active=cftlib'
There is also a dependency on Azure Service Bus.
The application will start locally on http://localhost:8085
A local development environment can be created using the ecm-ccd-docker project. See here
Required:
- DB_URL
- ET_MSG_HANDLER_POSTGRES_PASSWORD
- ET_MSG_HANDLER_CASEWORKER_PASSWORD
- CREATE_UPDATES_QUEUE_NAME
- UPDATE_CASE_QUEUE_NAME
- CREATE_UPDATES_QUEUE_SEND_CONNECTION_STRING
- CREATE_UPDATES_QUEUE_LISTEN_CONNECTION_STRING
- UPDATE_CASE_QUEUE_SEND_CONNECTION_STRING
- UPDATE_CASE_QUEUE_LISTEN_CONNECTION_STRING
There is a dependency on a postgres database to be running locally.
To install the database schema required for et-ccd-callbacks execute the following command:
./bin/init-db.sh
There is also a dependency on Azure Service Bus.
To run the project locally you should use the dev profile. You can run the application by executing following command:
./gradlew bootRun --args='--spring.profiles.active=dev'
The application will start locally on http://localhost:8085
API documentation is provided with Swagger: UI to interact with the API resources
http://localhost:8085/swagger-ui.html
All database updates are applied using flyway. See src/main/resources/db
To run all unit tests please execute following command:
./gradlew test
To run all checks (including unit tests) please execute following command:
./gradlew check
To run the OWASP checks for vulnerabilities in dependencies:
./gradlew dependencyCheckAggregate
This project is licensed under the MIT License - see the LICENSE.md file for details.