Aggregation agg=new Aggregation( match(Criteria.where("_id.time").gte(date1).lt(date2)), group("_id").count("value."+val).as("totals"),
sort(Sort.DEFAULT_DIRECTION,"_id") );
怎么解决的啊。。是不是版本的原因啊?
导入
import static org.springframework.data.mongodb.core.aggregation.Aggregation.group;
import static org.springframework.data.mongodb.core.aggregation.Aggregation.match;
import static org.springframework.data.mongodb.core.aggregation.Aggregation.project;
import static org.springframework.data.mongodb.core.aggregation.Aggregation.sort;
@bichen: 嗯嗯 对的 后来解决了 谢谢