This article is taken from Getting started with Spring Framework, 4th Edition book. The source code for this article can be found in ch19-reactor3-webservice project ( http://bit.ly/2zTuD0Y ). To run the project, deploy ch19-reactor3-webservice project on Tomcat 9 and execute the ReactiveWebClient 's main method (located in src/test/java folder). To create a reactive RESTful web service you need to ensure that each layer (data access, service and web) of the web service are reactive in nature. Developing the data access layer using Spring Data As reactive database driver is available for MongoDB, you can use Spring Data (Kay release) to reactively interact with MongoDB database. The following listing shows the BankAccountReactorRepository (a Spring Data repository) that defines methods that return reactive types (defined by Reactor): public interface BankAccountReactorRepository extends ReactiveMongoRepository<BankAccountDetails, String...
Comments
Post a Comment