public List findByExample(Class entityClass) {
log.debug("finding instance by example");
try {
Example example = Example.create(entityClass).ignoreCase().enableLike(MatchMode.ANYWHERE);
List results = findByExample(example ,entityClass);
log.debug("find by example successful, result size: " + results.size()); return results;
} catch (RuntimeException re) {
log.error("find by example failed", re); throw re;
}
}
dao里面加入findByExample方法
最新推荐文章于 2018-03-07 10:04:19 发布