模糊查询 regex(".*?\\"+questionContent+".*")
String questionContent = "需求"
;
Query query =
new Query();
query.addCriteria(Criteria.where("demandName").
regex(".*?\\"+questionContent+".*"));
System.out.println(mongo.count(query, AdvTrusteeship.class));
转载于:https://www.cnblogs.com/lemon-flm/p/11475745.html
相关资源:JAVA上百实例源码以及开源项目