当前位置: 首页>>代码示例>>Java>>正文


Java JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS属性代码示例

本文整理汇总了Java中com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS属性的典型用法代码示例。如果您正苦于以下问题:Java JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS属性的具体用法?Java JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS怎么用?Java JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider的用法示例。


在下文中一共展示了JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRESTClientProxy

@Override
protected <T> T createRESTClientProxy(String apiUrl, Class<T> proxy) {
    List providers = new ArrayList();
    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    mapper.setAnnotationIntrospector(new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()));

    JacksonJaxbJsonProvider jsonProvider
            = new JacksonJaxbJsonProvider(mapper, JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS);
    providers.add(jsonProvider);
    T t = JAXRSClientFactory.create(apiUrl, proxy, providers, true);
    Client client = (Client) t;
    client.header("User-Agent", getImplementationName() + "=" + getVersion());
    return t;
}
 
开发者ID:gopaycommunity,项目名称:gopay-java-api,代码行数:15,代码来源:CXFGPConnector.java

示例2: createProviders

public static List<Object> createProviders(ObjectMapper objectMapper) {
    ArrayList providers = new ArrayList();
    Annotations[] annotationsToUse = JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS;
    providers.add(new JacksonJaxbJsonProvider(objectMapper, annotationsToUse));
    providers.add(new ExceptionResponseMapper());
    return providers;
}
 
开发者ID:fabric8io,项目名称:fabric8-devops,代码行数:7,代码来源:ElasticsearchClient.java

示例3: getJsonProvider

public static JacksonJaxbJsonProvider getJsonProvider() {
    ObjectMapper mapper = new ObjectMapper();
    mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
    //mapper.getSerializationConfig().addMixInAnnotations(File.class, MixIn_File.class);
    JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider(mapper, JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS);
    provider.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.TRUE);
    provider.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, Boolean.FALSE);
    return provider;
}
 
开发者ID:odiszapc,项目名称:stem,代码行数:9,代码来源:ClusterManagerDaemon.java

示例4: defaultJsonProvider

protected JacksonJaxbJsonProvider defaultJsonProvider() {
    ObjectMapper objectMapper = new ObjectMapper();
    objectMapper.registerModule(new JodaModule());
    objectMapper.configure(com.fasterxml.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
    return new JacksonJaxbJsonProvider(objectMapper, JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS);
}
 
开发者ID:apache,项目名称:syncope,代码行数:6,代码来源:SyncopeClientFactoryBean.java


注:本文中的com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。