https://github.com/genescu/spring-boot-with-postgresql
Spring Boot with PostgreSQL
https://github.com/genescu/spring-boot-with-postgresql
java postgresql spring-boot
Last synced: about 2 months ago
JSON representation
Spring Boot with PostgreSQL
- Host: GitHub
- URL: https://github.com/genescu/spring-boot-with-postgresql
- Owner: genescu
- Created: 2019-03-04T03:37:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-13T12:12:17.000Z (about 7 years ago)
- Last Synced: 2025-01-24T01:41:24.451Z (over 1 year ago)
- Topics: java, postgresql, spring-boot
- Language: Java
- Homepage:
- Size: 76.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-boot-postgresql
docker pull postgres
mkdir -p $HOME/docker/volumes/postgres
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
http://localhost:8090/h2-console/
# Database
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=docker
# Action
#2. Upload CSV file http://localhost:8090/upload
#3. Retrieve some data
http://localhost:8090/ships/1
curl -X GET "http://localhost:8090/ships/1"
A.
/port/{id}/{dateTime}
http://localhost:8090/port/2/1.1.2016%2012:00
http://localhost:8090/port/2/04.01.2016%2012:00
curl -X GET "http://localhost:8090/port/2/1.1.2016%2012:00"
curl -X GET "http://localhost:8090/port/2/04.01.2016%2012:00"
B.
/port/{id}/{startTime}/{endTime}
http://localhost:8090/port/2/1.1.2016%2012:00/04.01.2017%2020:55:23
curl -X GET "http://localhost:8090/port/2/1.1.2016%2012:00/04.01.2017%2020:55:23"