當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。