Using the Spring JDBCTemplate class

Spring provides a utility class called JDBCTemplate that makes it easy to perform many operations using JDBC. It provides convenient methods to execute SQL statements, map results of a query to an object (using the RowMapper class), close a database connection at the end of database operations, and many others.

Before we write any data access code, we will create a Data Transfer Object (DTO), CourseDTO, which will just contain members that describe one Course and setters and getters for them. Create CourseDTO in the packt.jee.course_management.dto package. Instances of ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.