Book Image

SPRING COOKBOOK

By : Jerome Jaglale, Yilmaz
Book Image

SPRING COOKBOOK

By: Jerome Jaglale, Yilmaz

Overview of this book

This book is for you if you have some experience with Java and web development (not necessarily in Java) and want to become proficient quickly with Spring.
Table of Contents (14 chapters)
13
Index

Introduction


JDBC (Java Database Connectivity) and Hibernate are the two most commonly used technologies to query a database from a Spring application.

For small projects and simple data models, JDBC is straightforward; you write your SQL queries yourself and Spring provides helpers to convert the query results into objects.

For complex data models, with several relationships between classes, Hibernate is easier; you deal with a standard Java framework (still using JDBC behind the scenes) that will generate the SQL queries for you.

This chapter focuses on JDBC because Spring doesn't change the normal way of using Hibernate. The integration of Hibernate with Spring, however, is covered in the Using Hibernate for powerful object persistence and querying recipe.