package com.opentable.jaxrs;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.PropertyResolver;

import com.opentable.spring.SpecializedConfigFactory;

@Configuration
public class JaxRsClientConfiguration {

    @Bean
    SpecializedConfigFactory<JaxRsClientConfig> jaxRsConfigFactory(PropertyResolver pr) {
        return SpecializedConfigFactory.create(pr, JaxRsClientConfig.class, "jaxrs.client.${name}");
    }

    @Bean
    JaxRsClientFactory jaxrsClientFactory(SpecializedConfigFactory<JaxRsClientConfig> config) {
        return new JaxRsClientFactory(config);
    }

    @Bean
    JaxRsFeatureBinding dataUriHandler() {
        return JaxRsFeatureBinding.bindToAllGroups(new DataUriFeature());
    }
}

@@ -23,16 +23,69 @@
 jaxrs;%0A%0A
+import com.fasterxml.jackson.databind.ObjectMapper;%0A%0A
 import o
@@ -855,11 +855,176 @@
 );%0A    %7D
+%0A%0A    @Bean%0A    JaxRsFeatureBinding jsonFeature(ObjectMapper mapper) %7B%0A        return JaxRsFeatureBinding.bindToAllGroups(JsonClientFeature.forMapper(mapper));%0A    %7D
 %0A%7D%0A

Enable Jackson on jaxrs clients