Skip to content

Commit

Permalink
Changed AnnotationUtils work with executable spring boot jars
Browse files Browse the repository at this point in the history
  • Loading branch information
cliedeman committed Nov 22, 2016
1 parent f07c9c4 commit ffad3c2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public final static class DEFAULT_NULL_CLASS extends DefaultMethodDataFetcher {}

static {
try {
classLoader = AnnotationUtils.class.getClassLoader();
// Change class loader to work with spring boot executable jars
// http://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html#executable-jar-system-classloader
classLoader = Thread.currentThread().getContextClassLoader();
classPath = ClassPath.from(classLoader);
} catch (IOException ex) {
Throwables.propagate(ex);
Expand Down

0 comments on commit ffad3c2

Please sign in to comment.