
Install mysql and mysql workbench, then configure the root password and startup service; follow three steps—download the installer, install mysql and workbench, and configure mysql on port 3306.
Open MySQL Workbench, connect to the local MySQL server, and test the connection. Create a database named mydb using the query window and run the create database command.
Install MySQL Workbench guides you through downloading and installing the MySQL Workbench GUI client, launching it, connecting to local and remote MySQL servers, and creating databases in the query window.
Explore the official Spring Data JPA reference documentation and Spring Boot properties to configure data sources and Hibernate in Spring projects using the application.properties file.
Delete the repository in the .m2 folder, then update the project to re-fetch dependencies and sync the Maven project.
Learn how ORM maps a Java class to a database table and its fields to columns, enabling object-oriented developers to save, update, and delete objects without writing sql.
Model a product entity and map it with JPA annotations in a spring data project. Create a repository for crud operations, configure data source in properties, and test with JUnit.
Upgrading the course to the latest Spring Boot, from 1.4.x to 2.x, and learning the updated Spring Data JPA with Hibernate, including the few method differences.
Configure the data source in Spring Boot by editing application.properties to set the JDBC URL, username, and password, enabling a MySQL connection on localhost:3306 with database mydb.
Create a product entity, save it via the product repository, and observe Spring Data and Hibernate ORM handling the persistence in a JUnit test.
Explain how Spring Boot loads the classpath, detects Spring Data JPA with Hibernate as the default ORM, connects to MySQL via the data source, and configures it through application.properties.
Use the repository's exists by id method to check if a record exists and delete it when the id is present, demonstrated with inserting, validating with select, and JUnit tests.
Use STS to create a new spring starter project, name the artifact id generators, set the group com.bharath.spring.data.id.generators and the package com.bharath.spring.data.id.generator, then select JPA and MySQL and finish.
Create the employee repository by defining an interface that extends CrudRepository, with Employee as the entity and long as the ID type, and organize packages for entities and repositories.
Configure the data source to enable testing, copy all properties from the source application.properties to a new one, then prepare to persist an employee record into the database.
Configure a table-based id generation using @TableGenerator named employee_gen, specify the table and id/value columns, set allocationSize to 100, and apply GenerationType.TABLE with generator.
Learn to use the contains keyword in Spring Data JPA repositories to search product descriptions, with a test for description contains 'Apple' that returns the product name 'Iwatch'.
Learn to use the between keyword in Spring Data JPA to find products priced between 500 and 2500, with tests confirming TV, washer, and dryer and excluding Iwatch.
Explore using the in keyword to filter records by multiple ids in spring data jpa with hibernate. Create a repository.findByIdsIn call with arrays.asList to fetch three products, excluding the dryer.
Learn to sort find all results by a single entity property using Spring Data JPA's sort object, with optional ascending or descending direction.
Create a new spring data project in STS, configure JPQL and native SQL queries, and set up JPA and MySQL dependencies with application properties for JDBC URL and show SQL.
Add data by creating and saving two student records through a test, injecting the repository, and running the JUnit test to produce four records for upcoming JPQL queries.
Learn to fetch partial data with JPQL by selecting first name and last name, returning a list of object arrays, and iterating to display each student's partial fields.
Learn to query students by score range in spring data jpa with hibernate, using jpql and named parameters min and max, and test results with junit.
Add paging to a repository method by introducing a pageable parameter and passing a page request to fetch paged student records, with zero-based pages and configurable size.
Learn to sort records with Spring Data JPA using page request and sort objects, choosing ascending or descending order on fields like id and name, and understand paging behavior.
Sample of the reviews:
highly recommended, usually the courses of Professor Bharath are characterized by their extensive explanation in the examples which he himself is writing the code and explaining in detail, you will learn a lot about this subject and enjoy it if you are passionate about Spring and its related topics - Edilberto Ramos Salinas
Good course and clearly explained all topics. - Italo Diego Honorato Soto
A very good course with a very good content which is very well explained - Sergey Kargopolov
---
All source code is available for download
Responsive Instructor - All questions answered within 24 hours
Professional video and audio recordings (check the free previews)
---
Are you a java spring developer interested in mastering Springs powerful and easy to use ORM framework? Are you a java developer who want to create complete data access layer in two simple steps ? then this Spring Data JPA using Hibernate course is for you.It is a complete hand's on course with quizzes,assignments and a mini project at the end.
Spring data JPA removes all the boiler plate coding that we write to create Data Access Layer for our applications while using JPA and ORM tools like Hibernate.And with the power of spring boot there is zero xml or java based configuration required.
Hibernate is the most popular object-relational mapping framework and the most used JPA providers. Hibernate maps our java classes to database tables.It offers component mapping,inheritance mapping and supports various associations among objects.
Spring data JPA makes it super easy to use there powerful features of Hibernate by removing all the configuration and use of low level APIs.Spring Data makes it possible to remove the DAO implementations entirely – the interface of the DAO is now the only artifact that needs to be explicitly defined.
Every section in the course is loaded with hands on examples.You will also work on assignments at the end of each section.You will also work on a mini project at the end of the course.
After taking this class, developers will be able to build faster, more flexible and easier to maintain application persistence layers with Spring Data JPA Using Hibernate.
What Will I Learn?
Master the concepts of ORM,Spring Data JPA and Hibernate
Perform CRUD operations against a database with two simple steps
Configure auto generated IDs for the Primary Key fields
Realize the power of Spring Data Finder methods
Load data from database with with out implementing any code or SQL
Learn and use JPQL - Java Persistence Query Language
Execute native sql queries from your Spring Data Application
Use Paging and Sorting Learn the different types of Hibernate Mappings
Implement Component Mapping
Implement Inheritance Mapping Master Associations and use all the four types of associations
See Hibernate caching in action
Learn and manage Transactions
Work on a mini Patient Scheduling application