Spring Boot JdbcTemplate example with SQL Server

In this tutorial, we’re gonna build a Spring Boot example that use Spring JdbcTemplate to interact with Microsoft SQL Server 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 MSSQL Database (SQL Server)

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

Unit Test:
Spring Boot – Rest Controller Unit Test with @WebMvcTest

Using Spring Data JPA instead:
Spring Boot, Hibernate, JPA, SQL Server: CRUD Operations example

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 Repositiory
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