Example usage for org.springframework.data.projection ProxyProjectionFactory ProxyProjectionFactory

List of usage examples for org.springframework.data.projection ProxyProjectionFactory ProxyProjectionFactory

Introduction

In this page you can find the example usage for org.springframework.data.projection ProxyProjectionFactory ProxyProjectionFactory.

Prototype

protected ProxyProjectionFactory() 

Source Link

Document

Creates a new ProxyProjectionFactory .

Usage

From source file:org.springframework.data.projection.ProjectionIntegrationTests.java

@Test // DATACMNS-909
public void jacksonSerializationDoesNotExposeDecoratedClass() throws Exception {

    ProxyProjectionFactory factory = new ProxyProjectionFactory();
    SampleProjection projection = factory.createProjection(SampleProjection.class);

    ParseContext context = JsonPath//from   ww  w.j  a v a2 s . c  o m
            .using(new ConfigurationBuilder().options(Option.SUPPRESS_EXCEPTIONS).build());
    DocumentContext json = context.parse(new ObjectMapper().writeValueAsString(projection));

    assertThat(json.read("$.decoratedClass", String.class)).isNull();
}