SSH note Two integration hibernate and spring

Source: Internet
Author: User
Tags datetime ssh create database

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 ');

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.