mysql-connector-java: This is needed to provide jdbc driver specific to MySQL database.spring-boot-starter-jdbc: This is needed to use Spring DAO JDBC functionality.It supports both MVC and RESTFul applications.
This tutorial will discuss how to setup the Spring DAO for JdbcTemplate, and the basics on inserting data and retrieving them. However, JDBC has its awkwardness as well, once I get the data out, I have to map them to an entity object. And sometimes, the ORM framework can make coding incredibly awkward. And I know it can be a little faster than the ORM. To me, JDBC is just a very simple and straight forward way of getting data in and out of database. So a lot of the code is done with JDBC, maybe using Spring JDBC can help? Who knows. And an upgrade is needed, and you are the one appointed to do this. Sometimes, you inherit things that were done in the past. Another reason is supporting legacy code.With JDBC, you can work directly with the query itself and optimize it any way you want.In today's world, we have Entity Framework, and Hibernate for ORM, why does JDBC matter? There are two major reasons: One of the Spring technologies that I didn't have the fortune to work with in the past is the JdbcTemplate. What I learned is that even though I hate the stuff, there is no escape from it. Over the years, I have worked with ADO.NET, the Entity Framework, Hibernate, SSRS reporting, and some other database related work. As I gain more experience, my dislike of databases is getting lesser and lesser. I used to hate work with databases because I was not very good with them. Data access is one of my favorite topics. In this tutorial, I am going to discuss something fun. This will be my last tutorial for the year 2018.