Open victornoel opened 5 years ago
@victornoel I'd also try to fallback to system properties if env-variable was not found, it may be helpful for unit/integration testing, we can specify some configuration in failsafe plugin declaration and Configuration
class will automatically catch these values
@g4s8 also there is another class named App.Options
that seems to also duplicate the functionality. I think all of this could end up with one interface and multiple implementations, something like:
Configuration conf = new Chained(
new ArgsConfiguration(args),
new EnvConfiguration(),
new SystemPropsConfiguration(),
new DefaultsConfiguration("OPT1", "val1", "OPT2", "val2")
);
@0crat resign
@0crat refuse
The class
EnvironmentVariables
should be namedConfiguration
orAppArguments
or something like that and have two different implementation: