You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon binding only maxDatabaseConnections is validated by BindingValidator. Should telemetryUrl not be supplied in the config the application only fails when the method is referenced.
The text was updated successfully, but these errors were encountered:
During the binding validation methods of extended interfaces are not validated and so only fail on use later during runtime.
For example:
public interface MasterConfig extends TelemetryConfig {
Integer maxDatabaseConnections();
}
public interface TelemetryConfig {
String telemetryUrl();
}
...
ReloadStrategy reloadStrategy = new PeriodicalReloadStrategy(1, TimeUnit.MINUTES);
ConfigFilesProvider files = () -> Arrays.asList(Paths.get("/etc/company/application/config.yml"));
ConfigurationSource source = new FilesConfigurationSource(files);
ConfigurationProvider configProvider = new ConfigurationProviderBuilder().withConfigurationSource(source)
.withReloadStrategy(reloadStrategy).build();
MasterConfig config = configProvider.bind("MasterConfig", MasterConfig.class);
Upon binding only maxDatabaseConnections is validated by BindingValidator. Should telemetryUrl not be supplied in the config the application only fails when the method is referenced.
The text was updated successfully, but these errors were encountered: