Spring Data 2020.0 - New and Noteworthy in Spring Data MongoDB 3.1
The Spring Data MongoDB 3.1 release is one of the modules that highly benefited from the recent changes in the Spring Data Commons module, by leveraging the infrastructure built there to bring reactive features like auditing and SpEL. The following snippet gives you an impression of what this means for declarative MongoDB queries using SpEL:
@Query("{ 'supervisor' : ?#{ hasRole('ROLE_ADMIN') " +
"? new Document('$regex', '*') : principal.name } }")
Flux<Person> findAllFilteredByRole();
@EnableReactiveMongoAuditing
uses the common infrastructure so you can keep track of changes easily.
…