Make sure bootstrap sources are ordered before use.

Make call to sort() before setting on builder.sources().

fixes gh-176

(cherry picked from commit 6dc35d1)
This commit is contained in:
Spencer Gibb
2017-02-14 16:17:05 -07:00
parent 710080cd47
commit 5b8ae3a96a
5 changed files with 76 additions and 1 deletions

View File

@@ -133,8 +133,8 @@ public class BootstrapApplicationListener
}
sources.add(cls);
}
builder.sources(sources.toArray(new Class[sources.size()]));
AnnotationAwareOrderComparator.sort(sources);
builder.sources(sources.toArray(new Class[sources.size()]));
final ConfigurableApplicationContext context = builder.run();
// Make the bootstrap context a parent of the app context
addAncestorInitializer(application, context);