Spring Boot Fundamentals: Connecting to Database | ChargeAhead LLC | Skillshare

Spring Boot Fundamentals: Connecting to Database

ChargeAhead LLC, Technologist

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
12 Lessons (36m)
    • 1. Course Overview

      2:21
    • 2. Roadmap

      4:45
    • 3. Audience

      0:17
    • 4. Prerequisites

      0:23
    • 5. Tools

      1:11
    • 6. Demo: App Preview

      1:41
    • 7. Demo: Integrating with H2 database

      1:56
    • 8. Demo: Schema Initialization and Connection Pooling

      6:10
    • 9. Demo: Implementing CRUD operations

      4:47
    • 10. Demo: Adding Thymeleaf pages for adding/updating and deleting items

      8:55
    • 11. Demo: Switching to MySQL database

      2:36
    • 12. Summary

      1:01

About This Class

Connecting to a backend database is an essential part of any application in order to persist data. Spring Boot and Spring framework makes this extremely easy and efficient.

In this course we will continue building our Spring MVC app we started building in the course Spring Boot Fundamentals: Creating a Spring MVC app and connect it to a backend database using  Spring Data JPA’s repositories.

we will first use H2, an open-source in-memory database as a backend store.We will show how we can make Spring Boot load starter sql scripts to create our tables, insert data upon startup, which is useful when testing or prototyping.We will add the repository layer to our app to implement CRUD operations and we will see how Spring data JPA makes it so easy.

We will add thymeleaf pages for adding / deleting and updating inventory

Next we will switch the backend database to be Mysql. We will show how easy it is to switch to MySQL with literally changing a few properties and requiring no code change at all.We will also take a look at connection pooling along the way.