Spring Boot JdbcTemplate example with MySQL: CRUD App

In this tutorial, we’re gonna build a Spring Boot Rest CRUD API example that use Spring JdbcTemplate to interact with MySQL database. You’ll know:

  • How to configure Spring Data JDBC to work with Database
  • How to define Data Models and Repository interfaces
  • Way to create Spring Rest Controller to process HTTP requests
  • Way to use Spring JdbcTemplate to interact with MySQL Database

Exception Handling:
– Spring Boot @ControllerAdvice & @ExceptionHandler example
– @RestControllerAdvice example in Spring Boot

Unit Test: Spring Boot – Rest Controller Unit Test with @WebMvcTest
Documentation: Spring Boot Swagger 3 example
Caching: Spring Boot Redis Cache example
Validation: Validate Request Body in Spring Boot
Using Spring Data JPA instead:
Spring Boot, Spring Data JPA, MySQL example

Read More

Spring Boot JdbcTemplate example: CRUD Rest API

In this tutorial, we’re gonna build a Spring Boot Rest CRUD API example that use Spring JdbcTemplate to interact with H2 database. You’ll know:

  • How to configure Spring Data JDBC to work with Database
  • How to define Data Models and Repository interfaces
  • Way to create Spring Rest Controller to process HTTP requests
  • Way to use Spring JdbcTemplate to interact with H2 Database

Exception Handling:
– Spring Boot @ControllerAdvice & @ExceptionHandler example
– @RestControllerAdvice example in Spring Boot

Unit Test:
Spring Boot – Rest Controller Unit Test with @WebMvcTest
Or Documentation: Spring Boot + Swagger 3 example (with OpenAPI 3)
Caching: Spring Boot Redis Cache example

Using Spring Data JPA instead:
Spring Boot JPA + H2 example: Build a CRUD Rest APIs

Read More

Spring Boot + SQL Server: CRUD Operations example

In this tutorial, we’re gonna build a Spring Boot CRUD Operations example with Maven that use Spring Data JPA to interact with Microsoft SQL Server (MSSQL). You’ll know:

  • Way to use SQL Server maven dependency in Spring Boot
  • How to configure Spring Data, JPA, Hibernate to work with Database
  • How to define Data Models and Repository interfaces
  • Way to create Spring Rest Controller to process HTTP requests
  • Way to use Spring Data JPA to interact with MSSQL Database

Exception Handling:
– Spring Boot @ControllerAdvice & @ExceptionHandler example
– @RestControllerAdvice example in Spring Boot

Testing:
– Spring Boot Unit Test for JPA Repository
– Spring Boot Unit Test for Rest Controller

Associations:
– Spring Boot One To One example with JPA, Hibernate
– Spring Boot One To Many example with JPA, Hibernate
– Spring Boot Many to Many example with JPA, Hibernate

Using JdbcTemplate instead of JPA:
Spring Boot JdbcTemplate example with SQL Server

Other databases:
– Spring JPA + H2
– Spring JPA + PostgreSQL
– Spring JPA + MySQL
– Spring Data + MongoDB

Read More