Spring JDBC example

In this example, we are using the PostgreSQL database. The table schema is as follows:

CREATE TABLE account(  accountNumber numeric(10,0) NOT NULL,   accountName character varying(60) NOT NULL,  CONSTRAINT accountNumber_key PRIMARY KEY (accountNumber))WITH (  OIDS=FALSE);

We will use the DAO pattern for JDBC operations, so let's create a Java bean that will model our Account table:

package com.packt.springhighperformance.ch5.bankingapp.model;public class Account {  private String accountName;  private Integer accountNumber;  public String getAccountName() {    return accountName;  }  public void setAccountName(String accountName) {    this.accountName = accountName;  }  public Integer getAccountNumber() {    return accountNumber;  } public ...

Get Hands-On High Performance with Spring 5 now with the O’Reilly learning platform.

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