Spring Boot MongoRepository ignoring validation

I have a Mongodb repository that is working fine:

@RepositoryRestResource(collectionResourceRel = "audits", path = "audits")
public interface AuditRepository extends MongoRepository<Audit, String> {

I have a bean, Audit that is:

@JsonIgnoreProperties(ignoreUnknown = true)
public class Audit {
    @Id private String id;

    private Date start;

    private Date end;

I’m using Lombok for getters/setters.

I expect the Repository to validate the Audit bean, but it saves an audit bean with null in the start and end date.

I added this to the build.gradle:


How do I tell the REST service to use validation? I don’t see anything in RepositoryRestConfiguration that will turn it on…