- Be able to develop spring boot web with localhost postgresql on docker on windows 11.
- Be able to access with vscode remote development.
- install WSL on windows.
- install ubuntu on WSL.
- install docker on ubuntu.
- install vscode on windows.
- install remote-WSL on vscode on windows.
- install remote development extension on vscode on windows.
- install docker extension on vscode on ubuntu.
- git pull this files to a directory on ubuntu.
- make directory project and postgres.
- add authority all to project directory.
- compose up docker-compose.yml on ubuntu.
- spring-boot-docker-postgres_1 container created.
- show containers on docker extension on vscode on ubuntu.
- attach vscode to the container.
- install some like following extensions on this container.
- Extension Pack for Java
- Lombok Annotations Support for VS Code
- Maven for Java
- Gradle for Java
- Spling Boot Extension Pack
- create project with spring initializer.
- set postgres to application.properties.
- build and run this project.
- show http://localhost:8080
spring.jpa.database=POSTGRESQL
spring.datasource.url=jdbc:postgresql://postgres:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=postgres
sudo service docker start
docker run -it --rm --network spring-boot-docker_default postgres pg_dump -h spring-boot-docker_postgres_1 -U postgres> postgresql.dump