Chapter 10. Hitting the database with Spring and JDBC

This chapter covers

  • Defining Spring’s data-access support
  • Configuring database resources
  • Working with Spring’s JDBC template

With the core of the Spring container now under your belt, it’s time to put it to work in real applications. A perfect place to start is with a requirement of nearly any enterprise application: persisting data. You have probably dealt with database access in an application in the past. In practice, you’ll know that data access has many pitfalls. You have to initialize your data-access framework, open connections, handle various exceptions, and close connections. If you get any of this wrong, you could potentially corrupt or delete valuable company data. In case ...

Get Spring in Action, 4th Edition: Covers Spring 4 now with O’Reilly online learning.

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