I’ve been writing a custom ProtocolResolver
– easy enough.
Registering it via spring.factories
seemed the obvious next step considering DefaultResourceLoader
s Javadoc:
Used as an SPI for
DefaultResourceLoader
, allowing for custom protocols to be handled without subclassing the loader implementation (or application context implementation).
Alas, my ProtocolResolver
is ignored. After some digging I found that ApplicationResourceLoader
does what the Javadoc suggests: loading all SPIs via SpringFactoriesLoader
.
I was about to open up an issue, when encouraged to ask a question here first. So: why not load the SPIs in the DefaultResourceLoader, or at least in Spring Boot’s ApplicationContext
implementations, where people are way more used to (and expect to) rely on SPIs and auto configuration mechanims?