Merge multiple spring-boot property file in a single file

445 Views Asked by At

Is there any automation tool that allows merging multiple properties files in a single file, using spring boot profiles:

from:

  • application-dev.properties
  • application-uat.properties
  • application-prd.properties

to:

  • application.properties

I know I could do this with a copy/paste but there are hundreds of files for different environments so I want to avoid mistakes.

Thanks

1

There are 1 best solutions below

0
Ashutosh Vaish On

You will have to write a shell script to do this while app deployment or right some task in grade/maven to merge all the files.

Or you can use @PropertySource to add all of these properties.