本文整理了Java中org.springframework.context.support.ReloadableResourceBundleMessageSource.clearCache
方法的一些代码示例,展示了ReloadableResourceBundleMessageSource.clearCache
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReloadableResourceBundleMessageSource.clearCache
方法的具体详情如下:
包路径:org.springframework.context.support.ReloadableResourceBundleMessageSource
类名称:ReloadableResourceBundleMessageSource
方法名:clearCache
[英]Clear the resource bundle cache. Subsequent resolve calls will lead to reloading of the properties files.
[中]清除资源包缓存。后续的解析调用将导致重新加载属性文件。
代码示例来源:origin: spring-projects/spring-framework
/**
* 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();
}
}
代码示例来源:origin: stackoverflow.com
ReloadableResourceBundleMessageSource rs = Global.getBean("messageSource", ReloadableResourceBundleMessageSource.class);
rs.clearCache();
代码示例来源:origin: org.springframework/spring-context
/**
* 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();
}
}
代码示例来源:origin: com.asual.summer/summer-core
public void setLocations(String[] locations) {
super.setLocations(locations);
rbms.clearCache();
rbms.setBasenames(locations);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* 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();
}
}
代码示例来源:origin: asual/summer
public void setLocations(String[] locations) {
super.setLocations(locations);
rbms.clearCache();
rbms.setBasenames(locations);
}
代码示例来源:origin: com.asual.summer/summer-core
rbms.clearCache();
rbms.setBasenames(fileBasenames.toArray(new String[fileBasenames.size()]));
代码示例来源:origin: asual/summer
rbms.clearCache();
rbms.setBasenames(fileBasenames.toArray(new String[fileBasenames.size()]));
代码示例来源:origin: org.owasp.webgoat/webgoat-container
/**
* <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();
}
内容来源于网络,如有侵权,请联系作者删除!