Skip to content

shivajimutkule/spring-webflux-postgresql-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-webflux-postgresql-demo

Read Me First

The following was discovered as part of building this project:

this project uses 'com.reactive.example.webfluxdemo' package.

Getting Started

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Additional Links

These additional references should also help you:

Postgres Setup

  • connect to postgres server using psql -U postgres -h localhost
create database test;
create user test with encrypted password 'test123'
grant all privileges on database test to test;

create tables

create user table

CREATE TABLE if not exists user_t (
    id serial primary key,
    name VARCHAR(30),
    company_id bigint,
    created_by bigint NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    last_updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    last_updated_by bigint NOT NULL
);

create company table

CREATE TABLE if not exists company_t (
    id serial primary key,
    name VARCHAR(30),
    city VARCHAR(20),
    created_by bigint NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    last_updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    last_updated_by bigint NOT NULL
);

Insert data into users

insert into user_t (name, company_id, created_by, last_updated_by) values('shivaji', 1, 1,1);
insert into user_t (name, company_id, created_by, last_updated_by) values('nitin', 1, 1,1);
insert into user_t (name, company_id, created_by, last_updated_by) values('sachin', 5, 1,1);

insert data into company

insert into company_t  (name, city, created_by, last_updated_by) values('abc pvt', 'pune', 1, 1);
insert into company_t  (name, city, created_by, last_updated_by) values('test pvt', 'pune', 1, 1);

REST Controller APIs

Functional Endpoints

Features:

  • Rest Controller as well as functional endpoint approach
  • Global Exception handler
  • Custom database converter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages