Set namespace when using AggregateApplication.run()

- When the apps are aggregated by calling AggregateApplication.run() the namespace for the apps need to be set before creating shared channel registry
This commit is contained in:
Ilayaperumal Gopinathan
2016-04-06 15:15:16 +05:30
parent 6816937827
commit 4466331266

View File

@@ -119,8 +119,9 @@ public class AggregateApplication {
protected static void prepareSharedChannelRegistry(SharedChannelRegistry sharedChannelRegistry, Class<?>[] apps) {
LinkedHashMap<Class<?>, String> appsToRegister = new LinkedHashMap<>();
for (Class<?> app : apps) {
appsToRegister.put(app, null);
for (int i = apps.length - 1; i >= 0; i--) {
String appClassName = apps[i].getName();
appsToRegister.put(apps[i], getNamespace(appClassName, i));
}
prepareSharedChannelRegistry(sharedChannelRegistry, appsToRegister);
}