use of org.springframework.sync.diffsync.PersistenceCallbackRegistry in project spring-sync by spring-projects.
the class DiffSyncControllerTest method mockMvc.
private MockMvc mockMvc(TodoRepository todoRepository) {
ShadowStore shadowStore = new MapBasedShadowStore("x");
PersistenceCallbackRegistry callbackRegistry = new PersistenceCallbackRegistry();
callbackRegistry.addPersistenceCallback(new JpaPersistenceCallback<Todo>(todoRepository, Todo.class));
DiffSyncController controller = new DiffSyncController(callbackRegistry, shadowStore);
MockMvc mvc = standaloneSetup(controller).setMessageConverters(new JsonPatchHttpMessageConverter()).build();
return mvc;
}
Aggregations