Example usage for org.springframework.data.rest.core.event ValidatingRepositoryEventListener ValidatingRepositoryEventListener

List of usage examples for org.springframework.data.rest.core.event ValidatingRepositoryEventListener ValidatingRepositoryEventListener

Introduction

In this page you can find the example usage for org.springframework.data.rest.core.event ValidatingRepositoryEventListener ValidatingRepositoryEventListener.

Prototype

public ValidatingRepositoryEventListener(ObjectFactory<PersistentEntities> persistentEntitiesFactory) 

Source Link

Document

Creates a new ValidatingRepositoryEventListener using the given repositories.

Usage

From source file:org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.java

/**
 * {@link org.springframework.context.ApplicationListener} implementation for invoking
 * {@link org.springframework.validation.Validator} instances assigned to specific domain types.
 *//*ww w. j a v  a 2s  .  c o  m*/
@Bean
public ValidatingRepositoryEventListener validatingRepositoryEventListener(
        ObjectFactory<PersistentEntities> entities) {

    ValidatingRepositoryEventListener listener = new ValidatingRepositoryEventListener(entities);
    configurerDelegate.configureValidatingRepositoryEventListener(listener);
    configureValidatingRepositoryEventListener(listener);

    return listener;
}