I am looking for a way to create custom ResourceLoader, that will use read from hbase table for the properties.
I found that i can create my own ApplicationContext, override getResource and use my own ResourceLoader.
I am looking for a way to get the same results, only using ClasspathXmlApplicationContext and not create my own contxt class.Code:@Override public Resource getResource(String location) { if (location.startsWith(HbaseResource.HBASE_PREFIX) ) { ResourceLoader loader = (ResourceLoader)getBean(HbaseResourceLoader.class); return loader.getResource(location); } else{ return super.getResource(location); } }
Lookling at ResourceLoaderAware i see this line:
Can this help me in any way?As alternative to a ResourcePatternResolver dependency, consider exposing bean properties of type Resource array, populated via pattern Strings with automatic type conversion by the bean factory.
Is there another way i missed to register custom ResourceLoader?


Reply With Quote
