0

I have multiple kind of environment on which my application runs like Test environment or prod environment.I have different configuration files for each environment named application-prod.properties and application-test.properties and all other common but necessary properties are saved in application.properties file.Here application.properties file is overridden by respective environment properties file thus getting the desired environment variables at runtime.

I want to store these environment specific variables in Postgresql database so that at runtime I could retrieve those variables based on the environment the application is running.

Can anyone help me to achieve this goal ? How should I design this database for storing environment variables ?

  • A properties file is a simple key/value pair. So all you need to do is to create a table that stores the property name and its value –  Dec 03 '18 at 12:03
  • I was looking for RDS type of structure but saving properties in key/value pair format will be more handy in the future. Thanks ! – INDRESH KHANDELWAL Dec 04 '18 at 07:53
  • Not sure what a "RDS type of structure" is, but you asked for a Postgres solution. The natural choice in a relational database to store data is to use a table. –  Dec 04 '18 at 07:55
  • RDS - Relational Database service. – INDRESH KHANDELWAL Dec 04 '18 at 08:12

0 Answers0