public class BoostedReloadableResourceBundleMessageSource extends ReloadableResourceBundleMessageSource{
@Override
public void setBasenames(String[] basenames) {
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
ArrayList<String> newBasenames = new ArrayList<String>();
for (String basename: basenames){
if (basename.contains("*")){
try {
logger.info("searching resources for "+ basename);
boolean addedStar = false;
String newBasename;
if (basename.endsWith("*"))
newBasename = basename;
else {
newBasename = basename + "*";
addedStar = true;
}
logger.info("really searching resources for "+ newBasename);
for (Resource resource : resolver.getResources(newBasename)){
String path =ResourcePathUtils.adapt(basename, addedStar, resource);
if (path != null) {
path= path.replace("classpath*:", "classpath:");
newBasenames.add(path);
logger.info("found "+ path);