org.springframework.data.rest.core.event.ValidatingRepositoryEventListener Java Examples
The following examples show how to use
org.springframework.data.rest.core.event.ValidatingRepositoryEventListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringDataRestValidationConfiguration.java From SMSC with Apache License 2.0 | 5 votes |
@Override public void configureValidatingRepositoryEventListener(ValidatingRepositoryEventListener validatingListener) { Validator validator = validator(); //bean validation always before save and create validatingListener.addValidator("beforeCreate", validator); validatingListener.addValidator("beforeSave", validator); }
Example #2
Source File: ApplicationConfiguration.java From spring-rest-black-market with MIT License | 4 votes |
@Override public void configureValidatingRepositoryEventListener(ValidatingRepositoryEventListener validatingListener) { validatingListener.addValidator("beforeCreate", new AdValidator()); }
Example #3
Source File: RestConfig.java From tutorials with MIT License | 4 votes |
@Override public void configureValidatingRepositoryEventListener(ValidatingRepositoryEventListener validatingListener) { validatingListener.addValidator("beforeCreate", validator ); validatingListener.addValidator("beforeSave", validator); }