GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lvivJavaClub/spring5

BranchesTags
Open more actions menu

Latest commit

 

History

28 Commits
28 Commits

Folders and files

NameName
Last commit message
Last commit date
controller
controller
 
 
repository
repository
 
 
server
server
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Spring5 Functional Web Framework Sample.

The project is a sample application that uses the functional web framework introduced in Spring 5.

Build

Use maven to build this project:

mvn clean instal

The structure of the project

Controller module contains

  • UserController class with router functions.
  • Application - starts as SpringBoot Application with Netty server.

Repository module contains

  • User POJO object
  • UserRepository Mongo reactive crud repository class.

Server module contains

  • TomcatServer. Contains a main method to start the server using Tomcat server.
  • NettyServer. Contains a main method to start the server using Reactor Netty server.
  • Client. Contains a main method to start the client.

Running

As spring boot application

  • Run the Application class

Reactor Netty server

  • Run the NettyServer class

Tomcat server

  • Run the TomcatServer class

Client

  • Run the Client class

Usage

Sample curl commands

Instead of running the client, here are some sample curl commands that access resources exposed by this sample:

Retrieve list of users

curl -v 'http://localhost:8080/users'

Retrieve user by id

curl -v 'http://localhost:8080/user/{id}'

Create new user

curl -d '{"name":"Jack Doe"}' -H 'Content-Type: application/json' -v 'http://localhost:8080/user'

About

No description or website provided.

Topics

java-8java-9java-9-modulespring5

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

12 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.