Make sure bootstrap sources are ordered before use.

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

fixes gh-176
This commit is contained in:
Spencer Gibb
2017-02-14 14:17:05 -07:00
parent 3269b8df54
commit 6dc35d1edc
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);