Spring Data Solr不支持Stream作为返回类型?

时间:2019-09-30 15:25:35

标签: spring-data spring-data-solr

interface BookRepository extends SolrCrudRepository<Book, String> {
    List<Book> findByIsbnIn(Collection<String> isbns);
    Stream<Book> findByTitleIn(Collection<String> titles);
}

...
// querying solr
try (Stream<Book> books = findByTitleIn(titles)) {
    books.map(...)
..

我收到Stream<Book>的转换例外。不支持吗?因为我正在阅读文档https://docs.spring.io/spring-data/solr/docs/4.0.10.RELEASE/reference/html/,但确实看到了Stream<T>

0 个答案:

没有答案