Today we are in the final step of the SSH configuration hibernate integration.
Four, integrated hibernate
4.1 Set into Hibernate Related:
A here we use the Proxool connection pool.
It is said that the most efficient of the three connection pools provided by Hibernate. Here I and listen to the network of the public, and so I have the technical ability, will be tested personally.
b) Hibernate mapping using Hibernate annonations technology.
Or on the internet, turned over a pile of data, found Annonations is the most elegant, but also the most labor-saving, the most efficient
4.2 Create a database first. Here I create a database called Mizidata, and a new table called user, which is used at the end of our test.
/**//*==============================================================*//**//* DBMS NAME:MYSQL5 * */**//* Created on:2009-04-27 22:50*//**//*==============================================================*/SET
foreign_key_checks=0;
DROP DATABASE IF EXISTS ' mizidata ';
CREATE DATABASE ' mizidata ' CHARACTER SET ' utf8 ' COLLATE ' utf8_general_ci ';
Use ' mizidata ';
/**//*==============================================================*//**//* Table:user *//**//*==============================================================*/CREATE TABLE USER (I D varchar (c) NOT NULL, USERNAME varchar () NULL, SEX int NULL, age int NULL, PASSWORD varchar (a) NULL, CRE Atedate datetime NULL, constraint Pk_user primary key (ID) type = InnoDB;