The project is a sample application that uses the functional web framework introduced in Spring 5.
Use maven to build this project:
mvn clean instalUserControllerclass with router functions.Application- starts as SpringBoot Application with Netty server.
UserPOJO objectUserRepositoryMongo reactive crud repository class.
TomcatServer. Contains amainmethod to start the server using Tomcat server.NettyServer. Contains amainmethod to start the server using Reactor Netty server.Client. Contains amainmethod to start the client.
- Run the
Applicationclass
- Run the
NettyServerclass
- Run the
TomcatServerclass
- Run the
Clientclass
Instead of running the client, here are some sample curl commands that access resources exposed
by this sample:
curl -v 'http://localhost:8080/users'curl -v 'http://localhost:8080/user/{id}'curl -d '{"name":"Jack Doe"}' -H 'Content-Type: application/json' -v 'http://localhost:8080/user'