Search in sources :

Example 1 with RestObjectMapperWithStringMapper

use of org.apache.servicecomb.demo.RestObjectMapperWithStringMapper in project java-chassis by ServiceComb.

the class JaxrsServer method main.

public static void main(final String[] args) throws Exception {
    RestObjectMapperFactory.setDefaultRestObjectMapper(new RestObjectMapperWithStringMapper());
    RestObjectMapperFactory.setConsumerWriterMapper(new RestObjectMapperWithStringMapperNotWriteNull());
    new SpringApplicationBuilder().sources(JaxrsServer.class).web(WebApplicationType.NONE).build().run(args);
}
Also used : RestObjectMapperWithStringMapperNotWriteNull(org.apache.servicecomb.demo.RestObjectMapperWithStringMapperNotWriteNull) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) RestObjectMapperWithStringMapper(org.apache.servicecomb.demo.RestObjectMapperWithStringMapper)

Example 2 with RestObjectMapperWithStringMapper

use of org.apache.servicecomb.demo.RestObjectMapperWithStringMapper in project java-chassis by ServiceComb.

the class JaxrsClient method main.

public static void main(String[] args) throws Exception {
    RestObjectMapperFactory.setDefaultRestObjectMapper(new RestObjectMapperWithStringMapper());
    RestObjectMapperFactory.setConsumerWriterMapper(new RestObjectMapperWithStringMapperNotWriteNull());
    new SpringApplicationBuilder().sources(JaxrsClient.class).web(WebApplicationType.NONE).build().run(args);
    org.apache.servicecomb.demo.jaxrs.client.JaxrsClient.run();
    TestMgr.summary();
}
Also used : RestObjectMapperWithStringMapperNotWriteNull(org.apache.servicecomb.demo.RestObjectMapperWithStringMapperNotWriteNull) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) RestObjectMapperWithStringMapper(org.apache.servicecomb.demo.RestObjectMapperWithStringMapper)

Example 3 with RestObjectMapperWithStringMapper

use of org.apache.servicecomb.demo.RestObjectMapperWithStringMapper in project incubator-servicecomb-java-chassis by apache.

the class JaxrsClient method main.

public static void main(String[] args) throws Exception {
    RestObjectMapperFactory.setDefaultRestObjectMapper(new RestObjectMapperWithStringMapper());
    RestObjectMapperFactory.setConsumerWriterMapper(new RestObjectMapperWithStringMapperNotWriteNull());
    new SpringApplicationBuilder().sources(JaxrsClient.class).web(WebApplicationType.NONE).build().run(args);
    org.apache.servicecomb.demo.jaxrs.client.JaxrsClient.run();
    TestMgr.summary();
}
Also used : RestObjectMapperWithStringMapperNotWriteNull(org.apache.servicecomb.demo.RestObjectMapperWithStringMapperNotWriteNull) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) RestObjectMapperWithStringMapper(org.apache.servicecomb.demo.RestObjectMapperWithStringMapper)

Example 4 with RestObjectMapperWithStringMapper

use of org.apache.servicecomb.demo.RestObjectMapperWithStringMapper in project incubator-servicecomb-java-chassis by apache.

the class JaxrsServer method main.

public static void main(final String[] args) throws Exception {
    RestObjectMapperFactory.setDefaultRestObjectMapper(new RestObjectMapperWithStringMapper());
    RestObjectMapperFactory.setConsumerWriterMapper(new RestObjectMapperWithStringMapperNotWriteNull());
    new SpringApplicationBuilder().sources(JaxrsServer.class).web(WebApplicationType.NONE).build().run(args);
}
Also used : RestObjectMapperWithStringMapperNotWriteNull(org.apache.servicecomb.demo.RestObjectMapperWithStringMapperNotWriteNull) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) RestObjectMapperWithStringMapper(org.apache.servicecomb.demo.RestObjectMapperWithStringMapper)

Example 5 with RestObjectMapperWithStringMapper

use of org.apache.servicecomb.demo.RestObjectMapperWithStringMapper in project incubator-servicecomb-java-chassis by apache.

the class JaxrsClient method init.

public static void init() throws Exception {
    BeanUtils.init();
    RestObjectMapperFactory.setDefaultRestObjectMapper(new RestObjectMapperWithStringMapper());
    RestObjectMapperFactory.setConsumerWriterMapper(new RestObjectMapperWithStringMapperNotWriteNull());
}
Also used : RestObjectMapperWithStringMapperNotWriteNull(org.apache.servicecomb.demo.RestObjectMapperWithStringMapperNotWriteNull) RestObjectMapperWithStringMapper(org.apache.servicecomb.demo.RestObjectMapperWithStringMapper)

Aggregations

RestObjectMapperWithStringMapper (org.apache.servicecomb.demo.RestObjectMapperWithStringMapper)8 RestObjectMapperWithStringMapperNotWriteNull (org.apache.servicecomb.demo.RestObjectMapperWithStringMapperNotWriteNull)8 SpringApplicationBuilder (org.springframework.boot.builder.SpringApplicationBuilder)4