You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading the Spring factories, SpringApplication.getSpringFactoriesInstances()uses the thread context classloader instead of the one passed at construction (inside the ResourceLoader). Using Thread.currentThread().getContextClassLoader() has caused an issue in my setup, as I was expecting the passed-in classloader to be used.
If you agree this is a bug, please use getClassLoader() in this method too, like the rest of the class does.
Also, there seem to be a total of 38 places in Spring Boot where this thread context classloader is used. Not sure if those are legitimate uses, but I'd be nice to check them whether they can also use the ResourceLoader instead, so as to avoid further bugs popping up because of the same root cause.