Skip to content

jdbctemplatemapper/using-spring-jdbctemplate-with-jdbctemplatemapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Spring JdbcTemplate with JdbcTemplateMapper

This is a tutorial on how to use JdbcTemplateMapper which is a wrapper around Spring JdbcTemplate to make CRUD and relationship queries less verbose.

The DZone article corresponding to this tutorial.

Github project for JdbcTemplateMapper library.

The example code for this tutorial is in class TutorialTest.java. The tests go against a MySQL database. On your MySQL instance you will need to create a database named 'tutorial'. Make appropriate changes to application.properties file so you can connect to your database. The tables needed for the tests are created automatically when the tests are run so no need to manually create them. To see how JdbcTemplateMapper is configured take a look at file JdbcTemplateMapperConfig.java

You can run the test from the command line with:

mvn clean package

You should see all the SQL being issued on the console.