Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring.config.import configuration is required in profiled application yml/properties #744

Open
cabbonizio opened this issue Feb 26, 2025 · 0 comments

Comments

@cabbonizio
Copy link

hi there, apologizes if this is standard operating functionality but I was curious on why I could not inject the spring.config.import property on command line -D argument but instead required to have a profiled file name for Spring Cloud Vault to work.

For example...........I have a "dev" and "qa" configuration. For both of the run commands for either configuration, I would like to simply inject at the command line:

-Dspring.config.import=vault://

Using command line seems to have no effect. I have to have an application yml/properties with the name of the profile in src/main/resources to work. Such as:

application-dev.yml
application-qa.yml

And the contents inside of the files, nothing more than:

spring:
  config.import: 
  - 'vault://'

Is there a way to do what I'm looking to do to globally and agnostic to the environment set the spring.config.import property without having to have a profiled app config file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant