Application Properties for Native and Git Sources
1 min read

Application Properties for Native and Git Sources

Native and git-based properties (file-based)
Application Properties for Native and Git Sources
Spring Cloud and Configuration Server

The Spring Boot Configuration Server can collect properties from multiple sources.

Native properties files are located in your resources folder in your config server module, under resources/config by default (and I have not seen a good reason to change it):

Git properties are located in a git repository which is retrieved by the configuration server. There are a lot of resources for this option, as it is a best practice to store application configuration data which has no secrets.

Multiple Properties

If you have for example an application named my_app, then you can have inside that directory properties files for different profiles: (default) ("dev" profile) ("acc" profile for acceptance)

When your app loads values form the configuration server, it will try to find them in the profile-specific properties (if exists) and cascade to the default properties file, same way as normal application configuration. So, for example, if you have the "dev" profile enabled for my_app, then the lookup order will be: