最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Stream in spring data jpa? - Stack Overflow

programmeradmin1浏览0评论

Does it make sense to return a Stream in the jpa method?

I'm looked at Query interface, and it just getResult and make it as stream. I can do it myself.

public interface TypedQuery<X> extends Query {
    List<X> getResultList();

    default Stream<X> getResultStream() {
        return this.getResultList().stream();
    }
发布评论

评论列表(0)

  1. 暂无评论