Also fix order of injection with plugins for transport client
See #13061
This commit is contained in:
parent
b1d963584e
commit
76c472973e
|
@ -133,6 +133,10 @@ public class TransportClient extends AbstractClient {
|
||||||
try {
|
try {
|
||||||
ModulesBuilder modules = new ModulesBuilder();
|
ModulesBuilder modules = new ModulesBuilder();
|
||||||
modules.add(new Version.Module(version));
|
modules.add(new Version.Module(version));
|
||||||
|
// plugin modules must be added here, before others or we can get crazy injection errors...
|
||||||
|
for (Module pluginModule : pluginsService.nodeModules()) {
|
||||||
|
modules.add(pluginModule);
|
||||||
|
}
|
||||||
modules.add(new PluginsModule(pluginsService));
|
modules.add(new PluginsModule(pluginsService));
|
||||||
modules.add(new EnvironmentModule(environment));
|
modules.add(new EnvironmentModule(environment));
|
||||||
modules.add(new SettingsModule(this.settings));
|
modules.add(new SettingsModule(this.settings));
|
||||||
|
@ -150,9 +154,6 @@ public class TransportClient extends AbstractClient {
|
||||||
modules.add(new ClientTransportModule());
|
modules.add(new ClientTransportModule());
|
||||||
modules.add(new CircuitBreakerModule(this.settings));
|
modules.add(new CircuitBreakerModule(this.settings));
|
||||||
|
|
||||||
for (Module pluginModule : pluginsService.nodeModules()) {
|
|
||||||
modules.add(pluginModule);
|
|
||||||
}
|
|
||||||
pluginsService.processModules(modules);
|
pluginsService.processModules(modules);
|
||||||
|
|
||||||
Injector injector = modules.createInjector();
|
Injector injector = modules.createInjector();
|
||||||
|
|
Loading…
Reference in New Issue