/** * Clear the resource bundle caches of this MessageSource and all its ancestors. * @see #clearCache */ public void clearCacheIncludingAncestors() { clearCache(); if (getParentMessageSource() instanceof ReloadableResourceBundleMessageSource) { ((ReloadableResourceBundleMessageSource) getParentMessageSource()).clearCacheIncludingAncestors(); } }
ReloadableResourceBundleMessageSource rs = Global.getBean("messageSource", ReloadableResourceBundleMessageSource.class); rs.clearCache();
/** * Clear the resource bundle caches of this MessageSource and all its ancestors. * @see #clearCache */ public void clearCacheIncludingAncestors() { clearCache(); if (getParentMessageSource() instanceof ReloadableResourceBundleMessageSource) { ((ReloadableResourceBundleMessageSource) getParentMessageSource()).clearCacheIncludingAncestors(); } }
public void setLocations(String[] locations) { super.setLocations(locations); rbms.clearCache(); rbms.setBasenames(locations); }
/** * Clear the resource bundle caches of this MessageSource and all its ancestors. * @see #clearCache */ public void clearCacheIncludingAncestors() { clearCache(); if (getParentMessageSource() instanceof ReloadableResourceBundleMessageSource) { ((ReloadableResourceBundleMessageSource) getParentMessageSource()).clearCacheIncludingAncestors(); } }
public void setLocations(String[] locations) { super.setLocations(locations); rbms.clearCache(); rbms.setBasenames(locations); }
rbms.clearCache(); rbms.setBasenames(fileBasenames.toArray(new String[fileBasenames.size()]));
rbms.clearCache(); rbms.setBasenames(fileBasenames.toArray(new String[fileBasenames.size()]));
/** * <p>updatePluginResources.</p> * * @param propertyFile a {@link java.nio.file.Path} object. */ public static void updatePluginResources(final Path propertyFile) { pluginLabels.setBasename("WebGoatLabels"); pluginLabels.setFallbackToSystemLocale(false); pluginLabels.setUseCodeAsDefaultMessage(true); pluginLabels.setResourceLoader(new ResourceLoader() { @Override public Resource getResource(String location) { try { return new UrlResource(propertyFile.toUri()); } catch (MalformedURLException e) { throw new RuntimeException(e); } } @Override public ClassLoader getClassLoader() { return Thread.currentThread().getContextClassLoader(); } }); pluginLabels.clearCache(); }