List of usage examples for org.springframework.data.rest.webmvc.json PersistentEntityToJsonSchemaConverter PersistentEntityToJsonSchemaConverter
public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associations associations,
MessageResolver resolver, ObjectMapper objectMapper, RepositoryRestConfiguration configuration,
ValueTypeSchemaPropertyCustomizerFactory customizerFactory)
From source file:org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverterUnitTests.java
@Before public void setUp() { TestMvcClient.initWebTest();// www.j a v a 2 s . c o m ValueTypeSchemaPropertyCustomizerFactory customizerFactory = mock( ValueTypeSchemaPropertyCustomizerFactory.class); converter = new PersistentEntityToJsonSchemaConverter(entities, associations, accessor, objectMapper, configuration, customizerFactory); }
From source file:org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.java
/** * Turns a domain class into a {@link org.springframework.data.rest.webmvc.json.JsonSchema}. * //ww w. ja va 2 s . co m * @return */ @Bean public PersistentEntityToJsonSchemaConverter jsonSchemaConverter() { return new PersistentEntityToJsonSchemaConverter(persistentEntities(), associationLinks(), resourceDescriptionMessageSourceAccessor(), objectMapper(), config(), new ValueTypeSchemaPropertyCustomizerFactory(repositoryInvokerFactory(defaultConversionService()))); }