The project is a sample application that uses the functional web framework introduced in Spring 5.
Use maven to build this project:
mvn clean instal
UserController
class with router functions.Application
- starts as SpringBoot Application with Netty server.
User
POJO objectUserRepository
Mongo reactive crud repository class.
TomcatServer
. Contains amain
method to start the server using Tomcat server.NettyServer
. Contains amain
method to start the server using Reactor Netty server.Client
. Contains amain
method to start the client.
- Run the
Application
class
- Run the
NettyServer
class
- Run the
TomcatServer
class
- Run the
Client
class
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'