MongoTemplate查今天的数据
解决方法:
Criteria where = new Criteria();
where.and("dateCreated").gte(LocalDate.now()).andOperator(Criteria.where("dateCreated").lt(LocalDate.now().plusDays(1)));
Query query = new Query(where);
long counts = template.count(query, NoticeRecord.class);