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

Avoiding duplication of properties between spring boot and gradle #124

Open
Dzeri96 opened this issue Jun 7, 2023 · 1 comment
Open

Comments

@Dzeri96
Copy link

Dzeri96 commented Jun 7, 2023

I'm not experienced with gradle so forgive me if this is very obvious, but I'm trying to have the plugin use the same configuration as it would when running in spring boot context.

For example, one would have the following properties files:

application.properties <- Properties that are the same across all environments
application-prod.properties <- Some properties overriden here
application-dev.properties <- Some properties overriden here

Let's also say that some of my properties look like this spring.datasource.password=${DATASOURCE_PASSWORD:test_pw}

How can I avoid duplicating all of these properties between gradle and spring? Also, what would be the best way to chose the spring env when running the plugin?

It's essentially the same question as this one on Sackoverflow, but it has no answers.

@landsman
Copy link

Yeah, the current approach is overcomplicated. It should be loaded from properties as a plugin for Maven in an ideal world.

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

2 participants