Skip to content

Load 1 million rows from file to DB through REST API

Notifications You must be signed in to change notification settings

ViktorVx/loadData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build

Start postgres

jdbc:postgresql:https://localhost:5432/load_data_db

Run maven tasks

mvn clean package

Run with postgres

Add environment variables:

db.user.name
db.user.password
db.connection.url

Then run

java -jar -Dspring.profiles.active=PROM build/libs/app.jar

Run with H2

java -jar -Dspring.profiles.active=DEV build/libs/app.jar

H2 console starts at

https://localhost:8080/h2-console

Use

Generate user list with N rows

https://localhost:8080/download/{N}

Load users to database from zip-file

https://localhost:8080/upload/

Example

POST https://localhost:8080/file/upload
Content-Type: multipart/form-data; boundary=WebAppBoundary

--WebAppBoundary
Content-Disposition: form-data; name="file"; filename="ts.zip"

Swagger

https://localhost:8080/swagger-ui.html

About

Load 1 million rows from file to DB through REST API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages