Skip to content

Let DB properties be loaded from resource path #287

@alcarraz

Description

@alcarraz

It would be nice that, in addition to be able to load DB properties from a file, it would be possible to load it from a resource in the class path.

I'm proposing that, similarly to the packages, use the jar: prefix for that, I'm writing the code for the PR, but if anyone else sees a reason not to do this or to do it differently I can adapt. Personally, I would prefer classpath: (or cp) or something else like that as a prefix, but for consistency I will go with jar:. Or I could implement all of them if agreed.

I'm talking about the DB_PROPERTIES system property in:

private void configureProperties(Configuration cfg) throws IOException
{
String propFile = System.getProperty("DB_PROPERTIES", "cfg/db.properties");
Properties dbProps = loadProperties(propFile);
if (dbProps != null)
{
cfg.addProperties(dbProps);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions