本文整理了Java中org.springframework.context.support.ResourceBundleMessageSource.resolveCodeWithoutArguments
方法的一些代码示例,展示了ResourceBundleMessageSource.resolveCodeWithoutArguments
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceBundleMessageSource.resolveCodeWithoutArguments
方法的具体详情如下:
包路径:org.springframework.context.support.ResourceBundleMessageSource
类名称:ResourceBundleMessageSource
方法名:resolveCodeWithoutArguments
[英]Resolves the given message code as key in the registered resource bundles, returning the value found in the bundle as-is (without MessageFormat parsing).
[中]将给定的消息代码解析为已注册资源束中的密钥,按原样返回在束中找到的值(不进行MessageFormat解析)。
代码示例来源:origin: molgenis/molgenis
@Override
// Overridden to make the visibility public
public String resolveCodeWithoutArguments(String code, Locale locale) {
return super.resolveCodeWithoutArguments(code, locale);
}
}
代码示例来源:origin: com.github.vindell/spring-biz
@Override
protected String resolveCodeWithoutArguments(String code, Locale locale) {
String module = RequestContextUtils.getModule();
Assert.hasText(module, " module is not specified!");
if(logger.isDebugEnabled()){
logger.debug("module:" + module);
}
String result = null;
for (String basename : basenames) {
if (StringUtils.endsWithIgnoreCase(basename, module)) {
ResourceBundle bundle = getResourceBundle(basename, locale);
if (bundle != null) {
result = getStringOrNull(bundle, code);
if (result != null) {
return result;
}
}
}
}
return super.resolveCodeWithoutArguments(code, locale);
}
内容来源于网络,如有侵权,请联系作者删除!