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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.