Note: we’ll create a backend in java Spring Boot with postgreSQL.
- JavaGuides: Spring Boot + PostgreSQL + JPA - CRUD
-
Go to java project and open server folder and run Application.java this listen the app on port 8083 full url should be
http://localhost:8083
. -
Get all cars path - Read
- /car/allcars
-
Register car path - Create
- /register/car
-
Delete car path - Celete
- /delete/car/{regdNum}
-
Update car path - Update
- /update/car
CREATE TABLE cars(
id serial PRIMARY KEY,
brand VARCHAR (50) NOT NULL,
name VARCHAR (50) NOT NULL,
model VARCHAR (10) NOT NULL,
year INT NOT NULL,
price DECIMAL NOT NULL,
UNIQUE(brand,name,model,year)
);