Closed
Description
I was hoping to refactor and move this line:
this.cachedProperties.put(filename, propHolder);
Rationale:
This allows me to extend ReloadableResourceBundleMessageSource and override just refreshProperties()
and loadProperties()
in the child class to extend reading and loading resources from a different source than .xml or .properties. My use case requires me to use JSON or db query
@Override
protected PropertiesHolder refreshProperties(String filename, @Nullable PropertiesHolder propHolder){
PropertiesHolder prop = super.refreshProperties(filename, propHolder);
if (propHolder.getProperties().isEmpty()){
//try refreshing as json. since XML and prop are not present)
}
}
And This Class has a lot of useful reload logic which is pointless to reimplement if the functionality is already present.