Prerequisite for a functional approach in Spring WebFlux

To work in functional way, the very first thing we need to do is to make our project WebFlux aware. For that we need to add the @EnableWebFlux annotation to the main bootstrap class as follows:

@SpringBootApplication
@EnableWebFlux
public class SpringWebFluxDemoApplication {
// other code ..
}

We also need to instruct Spring that the application is of the reactive type by adding the following property in the application.properties file:

spring.main.web-application-type=reactive
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.165.246