- 
                Notifications
    
You must be signed in to change notification settings  - Fork 38.8k
 
Description
Agim Emruli opened SPR-12857 and commented
There are a few implementations of the resource loader already available that support custom protocols like S3 (https://github.com/spring-cloud/spring-cloud-aws/blob/master/spring-cloud-aws-core/src/main/java/org/springframework/cloud/aws/core/io/s3/PathMatchingSimpleStorageResourcePatternResolver.java) and HDFS (https://github.com/spring-projects/spring-hadoop/blob/master/spring-hadoop-core/src/main/java/org/springframework/data/hadoop/fs/HdfsResourceLoader.java)
that can not register easily within the application context. It would be great if the Spring Framework would allow to register some custom ResourceLoader so that the default one can be overriden and then used by the beans.
Currently it is hard / not possible to override the resource load if the user is using a ClasspathXmlApplicationContext (or any context that does not extend GenericApplicationContext).
Affects: 4.1.6
Issue Links:
- Improve documentation on ProtocolResolvers and ResourceLoaders. [SPR-14671] #19235 Improve documentation on ProtocolResolvers and ResourceLoaders.
 - Ability to add a custom ResourceLoader conveniently in AnnotationConfigWebApplicationContext or conveniently as can be done via spring boot [SPR-13905] #18479 Ability to add a custom ResourceLoader conveniently in AnnotationConfigWebApplicationContext or conveniently as can be done via spring boot
 
Referenced from: commits 0dff782, 37de0b2
0 votes, 7 watchers