本文整理汇总了Java中org.apache.bval.guice.ValidationModule类的典型用法代码示例。如果您正苦于以下问题:Java ValidationModule类的具体用法?Java ValidationModule怎么用?Java ValidationModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValidationModule类属于org.apache.bval.guice包,在下文中一共展示了ValidationModule类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getModules
import org.apache.bval.guice.ValidationModule; //导入依赖的package包/类
@Override
protected List<Module> getModules(Properties properties) {
List<Module> modules = Lists.newArrayList();
// client stuff
modules.add(new SingleUserAuthModule(properties.getProperty(DOWNLOAD_USER_KEY),
properties.getProperty(DOWNLOAD_PASSWORD_KEY)));
modules.add(new RegistryWsClientModule(properties));
modules.add(new ChecklistBankWsClientModule(properties));
// others
modules.add(new WsAuthModule(properties));
modules.add(new IdentityAccessModule(properties));
modules.add(new ValidationModule());
modules.add(new OccurrencePersistenceModule(properties));
modules.add(new OccurrenceSearchModule(properties));
modules.add(new OccurrenceDownloadServiceModule(properties));
modules.add(new TitleLookupModule(true, properties.getProperty("api.url")));
return modules;
}
示例2: configure
import org.apache.bval.guice.ValidationModule; //导入依赖的package包/类
@Override
protected void configure() {
bindInterceptor(annotatedWith(Api.class), AUTH_MATCHER, new AuthInterceptor());
// We must respect this interceptor order.
bindInterceptor(annotatedWith(Api.class), annotatedWith(Validate.class),
new ValidationTranslationInterceptor());
install(new ValidationModule());
}