本文整理汇总了Java中org.glassfish.jersey.server.validation.ValidationFeature类的典型用法代码示例。如果您正苦于以下问题:Java ValidationFeature类的具体用法?Java ValidationFeature怎么用?Java ValidationFeature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ValidationFeature类属于org.glassfish.jersey.server.validation包,在下文中一共展示了ValidationFeature类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: generateResourceConfig
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
static ResourceConfig generateResourceConfig(Config config, Graphene graphene) {
ResourceConfig rc = new ResourceConfig();
// settings
rc.property(ServerProperties.FEATURE_AUTO_DISCOVERY_DISABLE, true);
rc.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true); // TODO: remove in production
// basic features
rc.register(CORSFilter.class);
rc.register(JacksonFeature.class);
rc.register(ValidationFeature.class);
// custom resources
GrapheneResourceFactory factory = new GrapheneResourceFactory(config, graphene);
rc.register(factory.createResource(AdminResource.class));
rc.register(factory.createResource(CoreferenceResource.class));
rc.register(factory.createResource(RelationExtractionResource.class));
return rc;
}
开发者ID:Lambda-3,项目名称:Graphene,代码行数:22,代码来源:GrapheneRESTServer.java
示例2: ApiConfig
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
@Inject
public ApiConfig(ServiceLocator serviceLocator) {
register(JacksonFeature.class);
register(ValidationFeature.class);
property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, "true");
register(AuthenticationRequestFilter.class);
register(AdminNecessaryRequestFilter.class);
register(RepositoryControllRequestFilter.class);
register(HttpCacheControlFilter.class);
register(ApiForbiddenExceptionMapper.class);
register(ApiNotFoundExceptionMapper.class);
register(ApiLoginRequiredExceptionMapper.class);
register(AjaxValidationErrorExceptionMapper.class);
register(PostErrorResponseFilter.class);
GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);
GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);
guiceBridge.bridgeGuiceInjector(GuiceListener.get());
packages(false, this.getClass().getPackage() + ".rs");
}
开发者ID:kamegu,项目名称:git-webapp,代码行数:25,代码来源:ApiConfig.java
示例3: AppConfig
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
@Inject
public AppConfig(ServiceLocator serviceLocator) {
register(FreemarkerMvcFeature.class);
property(FreemarkerMvcFeature.TEMPLATES_BASE_PATH, "/WEB-INF/templates");
property(FreemarkerMvcFeature.TEMPLATE_OBJECT_FACTORY, FlexibleConfiguration.class);
register(AttachContextInterceptor.class);
register(ValidationFeature.class);
property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, "true");
register(AuthenticationRequestFilter.class);
register(AdminNecessaryRequestFilter.class);
register(RepositoryControllRequestFilter.class);
register(HtmlLoginRequiredExceptionMapper.class);
register(HttpCacheControlFilter.class);
GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);
GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);
guiceBridge.bridgeGuiceInjector(GuiceListener.get());
packages(false, this.getClass().getPackage() + ".html");
}
开发者ID:kamegu,项目名称:git-webapp,代码行数:24,代码来源:AppConfig.java
示例4: JerseyConfig
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
public JerseyConfig() {
register(ValidationFeature.class);
property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);
// Swagger listing resources
register(io.swagger.jaxrs.listing.ApiListingResource.class);
register(io.swagger.jaxrs.listing.SwaggerSerializers.class);
}
开发者ID:kraiss,项目名称:Template-Jersey_Rest,代码行数:9,代码来源:JerseyConfig.java
示例5: BaseApplication
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
public BaseApplication() {
packages(true, SERVICES_PACKAGE);
packages(true, DAO_PACKAGE);
packages(true, ANALYSIS_PACKAGE);
register(MultiPartFeature.class);
register(ValidationFeature.class);
register(DocumentsService.class);
}
开发者ID:vita-us,项目名称:ViTA,代码行数:9,代码来源:BaseApplication.java
示例6: getClasses
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(CoffeesResource.class);
classes.add(ValidationFeature.class);
return classes;
}
开发者ID:v5developer,项目名称:maven-framework-project,代码行数:8,代码来源:CoffeeApplication.java
示例7: registerFeatures
import org.glassfish.jersey.server.validation.ValidationFeature; //导入依赖的package包/类
/**
* Register server features
* @param config The config to register the features with
* @param restConfig The application's configuration
*/
protected void registerFeatures(Configurable<?> config, T restConfig) {
config.register(ValidationFeature.class);
}
开发者ID:confluentinc,项目名称:rest-utils,代码行数:9,代码来源:Application.java
注:本文中的org.glassfish.jersey.server.validation.ValidationFeature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论