https://github.com/spring-projects/spring-boot/blob/cb08065ece147343f445b3022e056dd41623bdc8/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/FilteredReactiveWebContextResource.java#L37

Hi, while trying to configure some file location using a property(say spring.kafka.ss.keystore-location=file/to/path), the default behavior for a reactive app is to use the FilteredReactiveWebContextResource class to locate the file.

Any action further on this drives me to an exception. Actually those exceptions(e.g. FilenotFoundException) are intentionally forced to happen either on the class or on the extended class.

That's why I had to use some prefix like spring.kafka.ss.keystore-location=**file**:path/to/file in order to use non reactive FileUrlResource class instead.

I couldn't find any documentation for understanding better what's the purpose of this class, and this why I'm not 100% sure this is an issue or I'm misunderstanding the class. It looks like that after setting a value, the only usable method is the getDescription one.

Comment From: bclozel

Hello @AlexMartinezVila

In the context of a typical Servlet web application, loading resources with an absolute or relative path (without any URL scheme) uses the Servlet context infrastructure and the dedicated Servlet locations. Doing the same with a non-Servlet application falls back to using the classpath.

Because most Spring Boot applications share properties with Servlet and non-Servlet web applications, we have introduced FilteredReactiveWebContextResource to avoid serving the entire classpath when the intent was to limit to Servlet resources. The FilteredReactiveWebContextResource javadoc explains that briefly.