Could not advance using next()

Could not advance using next()

I have a list of objects which I would like to return in Spring rest API and then read it as an array of objects in Angular:

I have a list of objects which I would like to return in Spring rest API and then read it as an array of objects in Angular:

public Stream<PaymentTransactions> findListByReference_transaction_id(Integer id);

I tried this:

@GetMapping("/reference_transaction_id/{id}")
public List<ResponseEntity<PaymentTransactionsDTO>> getByListReference_transaction_id(@PathVariable String id) {
    return transactionService
            .findListByReference_transaction_id(Integer.parseInt(id))
            .map(mapper::toDTO)
            .map(ResponseEntity::ok).collect(Collectors.toList());
}

But when I try to read it as an Angular Array I get could not advance using next() What is the proper way to return a List from the rest endpoint?

Edit:

@GetMapping("{id}")
    public ResponseEntity<List<ResponseEntity<PaymentTransactionsDTO>>> get(@PathVariable String id) {
        return ResponseEntity.ok(transactionService
                .findListById(Integer.parseInt(id)).stream()
                .map(mapper::toDTO)
                .map(ResponseEntity::ok).collect(Collectors.toList()));


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

How to Create REST with Spring-rest-2-ts and TypeScript

In this post, we discuss a Spring REST TypeScript generator that creates models and services that reflect backend models and REST services. I would like to introduce how you can REST with Spring-rest-2-ts TypeScript generator.

How to create a simple web application with Java 8, Spring Boot and Angular

In this tutorial, we'll look at how developers can combine multiple technologies to make a web application. Read on to get started!

TypeScript, Angular, Firebase & Angular Material Master class Tutorial

As the course progresses, you'll get familiar with: TypeScript, Angular Application Architecture, and Angular CLI. Angular Modules and Angular Components. Angular's Component LifeCycle Hooks....