@Service
public class LMSService {
@Autowired
private BookInterface a;
private Collection<Books1> findBooks(){
List<Books1> books=new ArrayList<Books1>();
for(Books1 booke : a.findAll())
{
books.add(booke);
}
return books;
}
@Repository
public interface BookInterface extends CrudRepository<Books1,Long>{
}
a.findAll()
方法给出错误
答案 0 :(得分:-1)
您需要添加通用参数
CrudRepository<Books1, Integer>