Again, it's a tedious task to build an SSH framework. However, always feel that they are built to feel handy, so try to find some fun from it.
Today's mission is to integrate Hibernate and spring. The finished effect is as follows (package view on the left and file view on the right):
1. Preparation (use MYSQL5 to create a new database, named Ssimdb)
1.1 Install MYSQL5 (slightly), after the installation is complete can use NAVICAT8 to manage MySQL;
1.2 Create database Ssimdb;
1.3 Creating a Table Ssim_user
1 drop table if exists Ssimdb.ssim_user
2
3/*====================================================== ========*/
4/* Table:ssim_user */
5/*============================== ================================*/
6 CREATE TABLE Ssimdb.ssim_user (
7 user_id Int (one) not null AUT O_increment comment ' primary key ',
8 group_id Int (one) not null comment ' group ',
9 user_email natio nal varchar comment ' email as username ',
user_password National varchar ' password ',
Comment lname National varchar Comment ' real name ',
user_sex National varchar (m) Comment ' sex ',
13 User_job National varchar Comment ' work ',
user_phone national varchar ' power Words ',
user_city national varchar Comment ' city ',
user_last_login datetime comment ' last login Record time ',
User_registeR datetime Comment ' Registration time ',
Primary KEY (user_id)
type = InnoDB;
ALTER TABLE Ssimdb.ssim_us ER comment ' User information table ';
INSERT into Ssim_user values (' 1 ', ' 1 ', ' ju@126.com ', ' 123456 ', ' Shong see ', ' Male ', ' IT ', ' 12345678912 ', ' Chengdu ', ' 2009-08-04 17:122 1:34 ', ' 2009-08-03 17:11:53 ');