0

I want to ask is it possible to have database properties outside of any property file now I have database properties inside dbconfig.properties but I want to have it be supplied from outside passing as an argument for example. Is there any suggestion to have this approach.

priyanka sharma
  • 73
  • 1
  • 2
  • 6

1 Answers1

1

I would follow the documentation:

24.2 Accessing command line properties:

By default SpringApplication will convert any command line option arguments (starting with ‘--’, e.g. --server.port=9000) to a property and add it to the Spring Environment. As mentioned above, command line properties always take precedence over other property sources.

Patrick
  • 12,336
  • 15
  • 73
  • 115