本文整理汇总了Java中org.hibernate.validator.spi.resourceloading.ResourceBundleLocator类的典型用法代码示例。如果您正苦于以下问题:Java ResourceBundleLocator类的具体用法?Java ResourceBundleLocator怎么用?Java ResourceBundleLocator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceBundleLocator类属于org.hibernate.validator.spi.resourceloading包,在下文中一共展示了ResourceBundleLocator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getContext
import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator; //导入依赖的package包/类
@Override
public GeneralValidator getContext(final Class<?> type) {
final ResourceBundleLocator resourceBundleLocator = new PlatformResourceBundleLocator("messages");
final MessageInterpolator messageInterpolator = new ResourceBundleMessageInterpolator(resourceBundleLocator);
final Configuration<?> config = Validation.byDefaultProvider().configure()
.messageInterpolator(messageInterpolator);
final BootstrapConfiguration bootstrapConfiguration = config.getBootstrapConfiguration();
final boolean isExecutableValidationEnabled = bootstrapConfiguration.isExecutableValidationEnabled();
final Set<ExecutableType> defaultValidatedExecutableTypes = bootstrapConfiguration
.getDefaultValidatedExecutableTypes();
return new GeneralValidatorImpl(validatorFactory, isExecutableValidationEnabled,
defaultValidatedExecutableTypes);
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:15,代码来源:ValidatorContextResolver.java
示例2: newResourceBundleLocator
import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator; //导入依赖的package包/类
protected ResourceBundleLocator newResourceBundleLocator() {
return ignoredLocale -> {
// not used default locacle managed in Hibernate validator,
// all messages use provided locale (e.g. request locale)
// to match with other message's locale
final Locale provided = messageLocaleProvider.provide();
return newHookedResourceBundle(provided);
};
}
开发者ID:lastaflute,项目名称:lastaflute,代码行数:10,代码来源:ActionValidator.java
示例3: buildBundleLocator
import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator; //导入依赖的package包/类
private ResourceBundleLocator buildBundleLocator(final String name) {
return locale -> Messages.getResourceBundle(name, locale);
}
开发者ID:icode,项目名称:ameba,代码行数:4,代码来源:ValidationFeature.java
示例4: CustomMessageInterpolator
import org.hibernate.validator.spi.resourceloading.ResourceBundleLocator; //导入依赖的package包/类
public CustomMessageInterpolator(ResourceBundleLocator userResourceBundleLocator) {
super(userResourceBundleLocator);
}
开发者ID:mikehartley,项目名称:yottr,代码行数:4,代码来源:CustomMessageInterpolator.java
注:本文中的org.hibernate.validator.spi.resourceloading.ResourceBundleLocator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论