File tree Expand file tree Collapse file tree
src/main/java/com/baeldung/webFluxLogging Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
34 xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
45 <modelVersion >4.0.0</modelVersion >
56 <groupId >com.baeldung</groupId >
4344 <artifactId >disruptor</artifactId >
4445 <version >${disruptor.version} </version >
4546 </dependency >
47+ <!-- Webflux for reactive logging example -->
48+ <dependency >
49+ <groupId >org.springframework.boot</groupId >
50+ <artifactId >spring-boot-starter-webflux</artifactId >
51+ <version >${spring-boot.version} </version >
52+ </dependency >
4653 </dependencies >
4754
4855 <properties >
4956 <log4j .version>1.2.17</log4j .version>
5057 <log4j-api .version>2.7</log4j-api .version>
5158 <log4j-core .version>2.7</log4j-core .version>
5259 <disruptor .version>3.3.6</disruptor .version>
60+ <spring-boot .version>2.1.0.RELEASE</spring-boot .version>
5361 </properties >
5462
5563</project >
Original file line number Diff line number Diff line change 1+ package com .baeldung .webFluxLogging ;
2+
3+ import reactor .core .publisher .Flux ;
4+
5+ public class WebFluxLoggingExample {
6+
7+ public static void main (String [] args ) {
8+ Flux <Integer > reactiveStream = Flux .range (1 , 5 ).log ();
9+
10+ reactiveStream .subscribe ();
11+
12+ reactiveStream = Flux .range (1 , 5 ).log ().take (3 );
13+
14+ reactiveStream .subscribe ();
15+
16+ reactiveStream = Flux .range (1 , 5 ).take (3 ).log ();
17+
18+ reactiveStream .subscribe ();
19+ }
20+
21+ }
You can’t perform that action at this time.
0 commit comments