SSH1環境搭建

來源:互聯網
上載者:User

以上視頻供參考,本人操作如下:

Structs + Spring + Hibernate

( MyEclipse + MySql + Tomcat + ConnectionPool )

 

項目主要功能:

前台:

1、使用者登入、註冊、修改個人資訊

2、查詢個人提過的問題

3、檢索問題

後台:

1、管理欄目:一級欄目,二級欄目

2、系統管理使用者

3、維護管理員資訊

4、使用者等級維護

5、問題維護

 

一、建立資料庫

net start mysql;

 

配置環境變數path:D:\Program Files\MySQL\MySQL Server 5.5\bin

mysql -uroot -p******;

create database mldn;

commit;

 

use mldn

/*==============================================================*//* DBMS name:      MySQL 5.0                                    *//* Created on:     2013-3-30 16:29:22                           *//*==============================================================*/drop table if exists admin;drop table if exists answer;drop table if exists item;drop table if exists question;drop table if exists subitem;drop table if exists user;/*==============================================================*//* Table: admin                                                 *//*==============================================================*/create table admin(   id                   int not null,   adminid              varchar(50),   adminpwd             varchar(50),   primary key (id));/*==============================================================*//* Table: answer                                                *//*==============================================================*/create table answer(   aid                  int not null,   quesans              longtext,   userid               varchar(50),   grade                varchar(50),   anstime              datetime,   status               int,   qid                  int,   primary key (aid));/*==============================================================*//* Table: item                                                  *//*==============================================================*/create table item(   itemid               int not null,   itemname             varchar(50),   itemcode             int,   primary key (itemid));/*==============================================================*//* Table: question                                              *//*==============================================================*/create table question(   qid                  int not null,   title                varchar(50),   content              longtext,   itemid               int,   subid                int,   userid               varchar(50),   grade                varchar(50),   offerscore           int,   status               int,   questiontime         datetime,   clickcount           int,   acceptlag            int,   commenflag           int,   primary key (qid));/*==============================================================*//* Table: subitem                                               *//*==============================================================*/create table subitem(   subid                int not null,   subname              varchar(50),   itemid               int,   subcode              int,   primary key (subid));/*==============================================================*//* Table: user                                                  *//*==============================================================*/create table user(   id                   int not null,   userid               varchar(50),   userpwd              varchar(50),   userques             varchar(50),   userans              varchar(50),   usermail             varchar(50),   integral             int,   grade                int,   sex                  varchar(2),   realname             varchar(50),   primary key (id));alter table answer add constraint FK_Reference_3 foreign key (qid)      references question (qid) on delete restrict on update restrict;alter table question add constraint FK_Reference_4 foreign key (itemid)      references item (itemid) on delete restrict on update restrict;alter table question add constraint FK_Reference_5 foreign key (subid)      references subitem (subid) on delete restrict on update restrict;alter table subitem add constraint FK_Reference_1 foreign key (itemid)      references item (itemid) on delete restrict on update restrict;

show  tables ;

二、MyEclipse設定資料庫串連

資料庫建立好後:

 三、創項目建SSH並添加SSH支援

添加順序:Spring -> Hibernate -> Struts

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.