- Postgres Server
- Java Jdk
- Git
- IntelliJ IDEA
- Clone this repo
- Open this project using your IntelliJ IDEA (If this is your first time opening the project from your IntelliJ IDEA, it will take some time for the gradle script to setup)
- Setup a Postgres Server
- Create an empty database, named
cdit
- Go to
src/main/resources
and openapplication.properties
file- Update your Postgres server url (spring.datasource.url)
- Update your Postgres server username (spring.datasource.username)
- Update your Postgres server password (spring.datasource.password)
- Create an empty database, named
- Run the web application
- Upload user
POST:/users/upload
Body (formdata)
- file
- Get users
GET:users
-
CSV File
To upload the user csv file, you need to prepare the csv file that meet the following requirements:- first line: header (name, salary)
- subsequent line:
- name
- salary (in cents)
e.g.
name,salary John,250005 Mary Posa,400000