• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java EntityFilteringFeature类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.glassfish.jersey.message.filtering.EntityFilteringFeature的典型用法代码示例。如果您正苦于以下问题:Java EntityFilteringFeature类的具体用法?Java EntityFilteringFeature怎么用?Java EntityFilteringFeature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EntityFilteringFeature类属于org.glassfish.jersey.message.filtering包,在下文中一共展示了EntityFilteringFeature类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: Main

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
private Main() {
    packages("us.askplatyp.kb.lucene.http");

    register(JacksonFeature.class);
    register(EntityFilteringFeature.class);
    register(new AbstractBinder() {
        @Override
        protected void configure() {
            bindFactory(WikidataLuceneIndexFactory.class).to(LuceneIndex.class);
        }
    });
    register(CORSFilter.class);
    register(ApiListingResource.class);
    register(SwaggerSerializers.class);
    EncodingFilter.enableFor(this, GZipEncoder.class);
    EncodingFilter.enableFor(this, DeflateEncoder.class);

    configureSwagger();
}
 
开发者ID:askplatypus,项目名称:platypus-kb-lucene,代码行数:20,代码来源:Main.java


示例2: configure

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean configure(final FeatureContext context) {
    final Configuration config = context.getConfiguration();

    if (!config.isRegistered(EntityFieldsProcessor.class)) {

        // register EntityFilteringFeature
        if (!config.isRegistered(EntityFilteringFeature.class)) {
            context.register(EntityFilteringFeature.class);
        }
        // Entity Processors.
        context.register(EntityFieldsProcessor.class);
        // Scope Resolver.
        context.register(EntityFieldsScopeResolver.class);

        return true;
    }
    return false;
}
 
开发者ID:icode,项目名称:ameba,代码行数:23,代码来源:EntityFieldsFilteringFeature.java


示例3: Api

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
public Api(){

        packages("de.anycook.api");

        property("sessionCookieDomain", Configuration.getInstance().getCookieDomain());
        register(MultiPartFeature.class);
        register(EntityFilteringFeature.class);

        if (Configuration.getInstance().isDeveloperMode()) {
            register(ExceptionListener.class);
        }

        // makes Session available with @Context
        register(new AbstractBinder() {
            @Override
            protected void configure() {
                bindFactory(SessionFactory.class).to(Session.class);
            }
        });
    }
 
开发者ID:anycook,项目名称:anycook-api,代码行数:21,代码来源:Api.java


示例4: configure

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
@Override
public boolean configure(FeatureContext context) {
  final Configuration config = context.getConfiguration();

  final String jsonFeature = CommonProperties.getValue(config.getProperties(), config.getRuntimeType(),
      InternalProperties.JSON_FEATURE, JSON_FEATURE, String.class);
  // Other JSON providers registered.
  if (!JSON_FEATURE.equalsIgnoreCase(jsonFeature)) {
    return false;
  }

  // Disable other JSON providers.
  context.property(PropertiesHelper.getPropertyNameForRuntime(InternalProperties.JSON_FEATURE, config.getRuntimeType()),
      JSON_FEATURE);

  // Register Jackson.
  if (!config.isRegistered(JacksonJaxbJsonProvider.class)) {
    // add the Jackson exception mappers with application/json output
    context.register(JsonMappingExceptionMapper.class);
    context.register(JsonParseExceptionMapper.class);

    if (EntityFilteringFeature.enabled(config)) {
      context.register(JacksonFilteringFeature.class);
      context.register(FilteringJacksonJaxbJsonProvider.class, MessageBodyReader.class, MessageBodyWriter.class);
    } else {
      context.register(JacksonJaxbJsonProvider.class, MessageBodyReader.class, MessageBodyWriter.class);
    }
  }

  return true;
}
 
开发者ID:sorskod,项目名称:webserver,代码行数:32,代码来源:JsonJacksonFeature.java


示例5: JerseyConfig

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
public JerseyConfig() {
      log.info("Registering classes");
      register(AppConfiguration.class);
      packages("com.pokebattler.fight.data");
      packages("com.pokebattler.fight.resources");
      register(ProtobufJsonProvider.class);
      register(ProtobufBinaryProvider.class);
      // need to be in order
      register(ETagResponseFilter.class);
      register(CORSResponseFilter.class);
      register(CacheControlResponseFilter.class);

      register(EntityFilteringFeature.class);
EncodingFilter.enableFor(this, GZipEncoder.class);
  }
 
开发者ID:celandro,项目名称:pokebattler-fight,代码行数:16,代码来源:JerseyConfig.java


示例6: DaoGenApplication

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
public DaoGenApplication() throws Exception {
    // 将与ProjectResource同Package的所有Class均注册为Jersey的Resource
    packages(ProjectResource.class.getPackage().getName());
    this.register(EntityFilteringFeature.class);

    Configuration.addResource("conf.properties");
}
 
开发者ID:ctripcorp,项目名称:dal,代码行数:8,代码来源:DaoGenApplication.java


示例7: RestDemoJaxRsApplication

import org.glassfish.jersey.message.filtering.EntityFilteringFeature; //导入依赖的package包/类
/**
	 * Register JAX-RS application components.
	 */
	public RestDemoJaxRsApplication() {
		
        packages("org.codingpedia.demo.rest");
        
//		// register application resources
//		register(PodcastsResource.class);
//		register(PodcastLegacyResource.class);
//
//		// register filters
//		register(RequestContextFilter.class);
//		register(LoggingResponseFilter.class);
//		register(CORSResponseFilter.class);
//
//		// register exception mappers
//		register(GenericExceptionMapper.class);
//		register(AppExceptionMapper.class);
//      register(CustomReasonPhraseExceptionMapper.class);
//		register(NotFoundExceptionMapper.class);
//
//		// register features
//		register(JacksonFeature.class);
		register(EntityFilteringFeature.class);
		EncodingFilter.enableFor(this, GZipEncoder.class);		
		
//		property(EntityFilteringFeature.ENTITY_FILTERING_SCOPE, new Annotation[] {PodcastDetailedView.Factory.get()});
	}
 
开发者ID:Codingpedia,项目名称:demo-rest-jersey-spring,代码行数:30,代码来源:RestDemoJaxRsApplication.java



注:本文中的org.glassfish.jersey.message.filtering.EntityFilteringFeature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StrRegEx类代码示例发布时间:2022-05-23
下一篇:
Java GetDatanodeInfoResponseProto类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap