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

Enhancement request: system property substitution in resource files #17

Closed
giamma opened this issue Sep 4, 2019 · 3 comments
Closed

Comments

@giamma
Copy link
Contributor

giamma commented Sep 4, 2019

When defining a datasource in a property file, or possibly any other supported resource, it would be great to be able to use system property substitution, e.g.

dataSource.serverName=${database.name}

This could be especially convenient for docker images or for quickly relocating the database server or also for passwords, which could be exported in the environment rather than being written in the file.

@h-thurow
Copy link
Owner

h-thurow commented Sep 8, 2019

@h-thurow
Copy link
Owner

h-thurow commented Sep 8, 2019

Okay, I see. My last comment is not helpful when defining a datasource, because when the datasource is created by Simple-JNDI properties are not read with JNDIConfiguration.

h-thurow added a commit that referenced this issue Sep 21, 2019
…ons configuration's, because the former is only done once on initialization.
@h-thurow
Copy link
Owner

From just released 0.19.0 on values can reference system properties. To be interpolated they must be in the form

${sj.sys:name_of_system_property}

See SJPropertiesSubstitutionTest.

@h-thurow h-thurow changed the title Enhancement request: system property substitution in JNDI resource file Enhancement request: system property substitution in property files Sep 21, 2019
@h-thurow h-thurow changed the title Enhancement request: system property substitution in property files Enhancement request: system property substitution in resource files Sep 21, 2019
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