From bf50be7584f1f8c08aa80f3a33a2edf496a32aad Mon Sep 17 00:00:00 2001 From: Steve Swinsburg Date: Mon, 16 Feb 2026 22:43:48 +1100 Subject: [PATCH] This updates the readme to describe another way of running the application using --spring.config.additional-location for override files that don't need to be a copy of the application.yaml (#916) Co-authored-by: Steve Swinsburg --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96b11b8..7ec71d2 100644 --- a/README.md +++ b/README.md @@ -73,13 +73,25 @@ docker run -p 8090:8080 -v $(pwd)/yourLocalFolder:/configs -e "--spring.config.l ``` Here, the configuration file (*another.application.yaml*) is placed locally in the folder *yourLocalFolder*. - - ``` docker run -p 8090:8080 -e "--spring.config.location=classpath:/another.application.yaml" hapiproject/hapi:latest ``` Here, the configuration file (*another.application.yaml*) is part of the compiled set of resources. +### Configuration with additional override files + +You can layer additional configuration files on top of the default application.yaml while preserving all the base settings. This approach allows you to create specific override files for different environments without duplicating the entire configuration. + +```bash +# Using Maven +mvn spring-boot:run -Dspring-boot.run.arguments="--spring.config.additional-location=classpath:your-overrides.yaml" + +# Using Docker +docker run -p 8080:8080 -e "--spring.config.additional-location=classpath:your-overrides.yaml" hapiproject/hapi:latest +``` + +Here, the additional configuration file (*your-overrides.yaml*) contains only the specific properties you want to override or add, while all default values from application.yaml remain unchanged. + ### One-liner for quickly getting an Implementation Guide installed into HAPI ```