🚀 Ready to take your Spring Boot skills to the next level? Join me in this hands-on tutorial, "Spring Boot Database Integration with a PostgreSQL Docker Image," as we guide you through the seamless process of connecting your Spring Boot application to a PostgreSQL database using Docker and few lines of code.
🐘 Dive into the world of JPA and Hibernate as we use it to create a users table in PostgreSQL and build an API that effortlessly creates and saves new users, giving your application a solid foundation for data-driven functionality.
🛠️ Key Learnings: Create
A Spring Boot DataSource Bean
A JPA User Entity and users table in Postgres
A JPA UserRepository
A Spring POST API to generate and save new users
👨💻 Whether you're a seasoned developer or just starting your journey, this tutorial is crafted for you. Follow along, gain practical insights, and witness the magic of database integration in Spring Boot.
💡 Ready to elevate your coding game? Hit play, code along, and transform your Spring Boot application into a data-handling powerhouse! 🔍🖥️ #SpringBoot #PostgreSQL #DatabaseIntegration #JPA #CodingTutorial #Docker
🔗 Access the complete source code on GitHub: https://github.com/pjl-software/full-...
Don't forget to subscribe, like, and share for more enlightening tech tutorials! Let's code together and unlock the full potential of your applications. 🚀👩💻👨💻
----------------------------------------------------------------
Steps to run the web app locally:
1. Clone the repo: $ git clone https://github.com/pjl-software/full-... and change directories into full-stack-auth-repo with $ cd full-stack-auth-repo
2. Checkout the branch with $ git checkout 08-db-integration-b
3. Start the entire application on docker using the bin bash script $ ./bin/docker-startup-scripts/run-app-with-docker
4. Create users with: curl -X POST https://localhost:8443/api/v1/users/create
5. View the running database with: $ ./bin/docker-shortcut-scripts/login -t "db" -c "psql app_db"
6. $ select * from users
----------------------------------------------------------------
Chapters
0:00 - Video coding objectives
1:10 - POST-ing new users to PostgreSQL demo
2:27 - Configure Spring Boot to connect to Postgres
6:35 - Creating a users table with JPA and Hibernate
11:45 - Create a POST API to generate and save new users