The fix for https://github.com/spring-projects/spring-hateoas/issues/1075 shows that the ResourceLoader used by devtools seems to require the classpath: prefix.

This issue was raised by @odrotbohm on Slack:

In my local test, I immediately run into DefaultResourceLoader, whereas the Boot project ends up in GenericApplicationContext, which then delegates to org.springframework.boot.devtools.restart.ClassLoaderFilesResourcePatternResolver which in turn delegates to a org.springframework.web.context.support.ServletContextResourcePatternResolver.

It's a bit tricky [to reproduce]. The original request is this one: https://github.com/spring-projects/spring-hateoas/issues/1075. I managed to see the resources not being loaded when putting a breakpoint at ReloadableResourceBundleMessageSource.refreshProperties(…). The Resource lookup returns the ServletContextResource when you initiate the request like Kai describes. My local test for this has been introduced here: https://github.com/spring-projects/spring-hateoas/commit/507f7de0c3df2f4f59aa86249e677b08af1f8f98. You can also see that I tweaked the setup to explicitly include the classpath: prefix for that. However, the test actually succeeds without that addition as well.

Comment From: wilkinsona

This doesn't appear to be a common problem as we haven't seen any other reports of the same problem.