spring boot jpa 使用<S extends T> List<S> findAll(Example<S> example)查询数据

直接上代码

//查询条件对象
TinventivePrinciple time = new TinventivePrinciple();
//设置需要查询的条件(赋值)
time.setIsTime(Short.parseShort("1"));
//定义example1
Example<TinventivePrinciple> example1 = Example.of(time);
//查询数据
List<TinventivePrinciple> timeList = tinventivePrincipleDao.findAll(example1);
原文地址:https://www.cnblogs.com/codecat/p/10946192.html