Код: Выделить всё
all-book-details: http-nio-8081-exec-1
book-details1: http-nio-8081-exec-1
У меня есть условие, при котором я не хочу использоватьPublishOn()
Код: Выделить всё
@GetMapping
public Flux getAll() {
logger.info("all-book-details: " + Thread.currentThread().getName());
return bookService.getAll().subscribeOn(Schedulers.boundedElastic());
}
Код: Выделить всё
@Override
public Flux getAll() {
logger.info("book-details1: " + Thread.currentThread().getName());
return bookRepository
.findAll()
.delayElements(Duration.ofSeconds(2))
.log()
.map(book -> {
book.setName(book.getName().toUpperCase());
return book;
});
}
Код: Выделить всё
public Flux getAll();
Код: Выделить всё
@Table("book")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builderpublic
class Book {
@Id
@Column("book_id")
private int bookId;
@Column("NAME")
private String name;
@Column("book_desc")
private String description;
private String publisher;
private String author;
}
но есть все сведения о книге: http-nio-8081-exec-1
book-details1: http-nio-8081 -exec-1
Подробнее здесь: https://stackoverflow.com/questions/790 ... ic-in-spri