Skip to content

Commit

Permalink
Merge branch 'main' into ELM_2135_reapplied-rename-project-manually
Browse files Browse the repository at this point in the history
  • Loading branch information
JazJax authored Sep 17, 2024
2 parents b354dd4 + 104acf2 commit 4c98aa5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Call http://localhost:8080/health with a browser to get app health info.

### Running with Docker


There is also a `docker-compose.yml` that can be used to run a local instance of the template in docker and also an
instance of HMPPS Auth (required if your service calls out to other services using a token).

Expand All @@ -42,6 +43,15 @@ docker compose pull && docker compose up --scale hmpps-electronic-monitoring-dat

will just start a docker instance of HMPPS Auth. The application should then be started with a `dev` active profile
in Intellij.
## Note on remaining TODOs and Examples from template app

We have tried to provide some examples of best practice in the application - so there are lots of TODOs in the code
where changes are required to meet your requirements. There is an `ExampleResource` that includes best practice and also
serve as spring security examples. The template typescript project has a demonstration that calls this endpoint as well.

For the demonstration, rather than introducing a dependency on a different service, this application calls out to
itself. This is only to show a service calling out to another service and is certainly not recommended!


## Note on remaining TODOs and Examples from template app

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package uk.gov.justice.digital.hmpps.templatepackagename.health

import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.stereotype.Component
import org.springframework.web.reactive.function.client.WebClient
import uk.gov.justice.hmpps.kotlin.health.HealthPingCheck

// HMPPS Auth health ping is required if your service calls HMPPS Auth to get a token to call other services
// Remove the health ping if no call outs to other services are made
@Component("hmppsAuth")
class HmppsAuthHealthPing(@Qualifier("hmppsAuthHealthWebClient") webClient: WebClient) : HealthPingCheck(webClient)

// Example ping health check calling out to other services
// @Component("exampleApi")
// class ExampleApiHealthPing(@Qualifier("exampleApiHealthWebClient") webClient: WebClient) : HealthPingCheck(webClient)

0 comments on commit 4c98aa5

Please sign in to comment.