The probate business service provides useful business logic to the frontend service and others via RESTful APIs.
probate-frontend • probate-caveats-frontend • probate-back-office • probate-orchestrator-service • probate-business-service • probate-submit-service • probate-persistence-service
- Java 21
- Gradle
- Docker
Install dependencies and build the service by executing the following command:
$ ./gradlew clean build
Once the build has completed, you will find the new .jar in build/libs
. You can run the .jar with the following command:
$ java -jar build/libs/business-service-1.0.1.jar
Bring up the environment:
# rebuild every time you make changes
./gradlew assemble
# first time only
npx @hmcts/probate-dev-env --create
# start the dev env
npx @hmcts/probate-dev-env
API documentation is provided with Swagger:
http://localhost:4400/swagger-ui.html
- UI to interact with the API resources
You may run a local instance of business service that points towards AAT BE services to use in conjunction with a local Orchestrator pointing to AAT, and a local FE instance (probate-frontend or probate-caveats). This allows one to debug the orchestrator by triggering events through local FE.
Steps:
- Ensure VPN is on.
- Run
./gradlew generateAatEnvFile
- Run
POINT_TO_AAT=true ./gradlew run
- After ~10 seconds, business service will be running.
To run all unit tests please execute the following command:
$ ./gradlew test
To run all checks (including unit tests) please execute the following command:
$ ./gradlew check
When building the project in your IDE (eclipse or IntelliJ), Lombok plugin will be required to compile.
For IntelliJ IDEA, please add the Lombok IntelliJ plugin:
- Go to
File > Settings > Plugins
- Click on
Browse repositories...
- Search for
Lombok Plugin
- Click on
Install plugin
- Restart IntelliJ IDEA
Plugin setup for other IDE's are available on [https://projectlombok.org/setup/overview]
Add the -parameters
setting to your compiler arguments in your IDE (Make sure you recompile your code after).
This is because we use a feature of jackson for automatically deserialising based on the constructor.
For more info see: https://github.com/FasterXML/jackson-modules-java8/blob/a0d102fa0aea5c2fc327250868e1c1f6d523856d/parameter-names/README.md
This project is licensed under the MIT License - see the LICENSE file for details.