JAVA-based SSM file under the framework of monitoring and management system

Record learning every day, have a good mood every day. * ^ _ ^ *

Thinking today, a complete file system monitoring and management project, which features need to achieve?
Such projects commonly described as follows:
As information technology advances, network transport has become the main way of transmission of information, means of information extremism increasingly enigmatic, monitor important information is very necessary. For information about safety problems, this chapter is designed to monitor the file system to achieve file transfers of important real-time monitoring, to transfer files securely to prevent the illegal theft purposes.
SSM (MYECLIPSE) for this framework and its projects, the idea of using the MVC can greatly reduce duplication of effort. And SSM (MYECLIPSE) framework with the best development tools is MYECLIPSE. MYECLIPSE integrates a large number of plug-ins, you can better use the SSM (MYECLIPSE) for development projects, while making more effective project development.
By carefully analyzing the file system monitoring and management system, we can draw the file system monitoring and management system is a background program.
In such a project, the system login role is essential for each login role is set account and password. To ensure the system can log in normal use. SSM (MYECLIPSE) contained in the project administrator login role.

The summary results of all system data: administrator (admin), ad hoc description (tesemiaoshu), the monitoring system (jiankongxitong)

Administrators table

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | administrator the above mentioned id 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password 
quanxian |  VARCHAR ( 255 ) |  | rights

 

Special description

Field Name | Type | properties | Description 
ID |  the INT ( . 11 ) |  a PRIMARY  KEY  | Ad Hoc described ID 
wenjianjiami |  VARCHAR ( 255 ) |  | file encryption 
wenjianchuanshu |  VARCHAR ( 255 ) |  | file transfer 
wenjiangenzong |  VARCHAR ( 255 ) |  | document tracking 
wenjianjieshou |  VARCHAR ( 255 )|  | Files received

 

Table Monitoring System

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | file monitoring the above mentioned id 
wenjianjiankong |  VARCHAR ( 255 ) |  | file monitoring 
wenjianhuifu |  VARCHAR ( 255 ) |  | File Recovery 
yuanchengkongzhi |  VARCHAR ( 255 ) |  | Remote control

 

 

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------

-- ----------------------------

-- Table structure for ggwenjianjiankongglxt

-- ----------------------------

DROP TABLE IF EXISTS `t_admin`;

CREATE TABLE `t_admin` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id',`username` VARCHAR(255) DEFAULT NULL COMMENT '账号', `password` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' password ' ,` quanxian` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' authority ' , a PRIMARY  KEY ( `id`) 

) ENGINE = MyISAM the DEFAULT the CHARSET = UTF8 the COMMENT = ' Administrators ' ; 

- ---------------------------- 

DROP  TABLE  IF  EXISTS `t_tesemiaoshu`; 

the CREATE  TABLEt_tesemiaoshu` `(` id` the INT ( . 11 ) the NOT  NULL the AUTO_INCREMENT the COMMENT ' Ad Hoc described in ID ' , `wenjianjiami` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' File Encryption ' ,` wenjianchuanshu` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' File Transfer ' , `wenjiangenzong` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' document tracking ' ,` wenjianjieshou`VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' file reception ' , a PRIMARY  KEY ( `id`) 

) ENGINE = MyISAM the DEFAULT the CHARSET = UTF8 the COMMENT = ' Ad Hoc described ' ; 

- ------------- --------------- 

the DROP  TABLE  the IF  EXISTS `t_jiankongxitong`; 

the CREATE  TABLE ` t_jiankongxitong` ( `id` the INT ( . 11 ) the NOT  NULL the AUTO_INCREMENT the COMMENT ' file monitoring ID ', `wenjianjiankong` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' document control ' ,` wenjianhuifu` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' file recovery ' , `yuanchengkongzhi` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' remote control ' , a PRIMARY  KEY (` id`) 

) ENGINE = MyISAM the DEFAULT the CHARSET = UTF8 the COMMENT = ' monitoring system';

 

 

Add Special description module:

Ad Hoc tianjiatesemiaoshuact defined parameters describing the incoming pages received in the tesemiaoshuController defined as tesemiaoshu. Wherein tesemiaoshu fields comprising: file encryption, file transfer, document tracking, file receiving, using the ad hoc tianjiatesemiaoshuact described objects stored in the database is defined in tesemiaoshuMapper insert method, the matching database statement insert into tesemiaoshu achieve Ad Hoc description data stored in the database. The part of the core code is as follows:

The ad hoc page described by the added transmission method tesemiaoshudao insert into the database tesemiaoshudao.insert (tesemiaoshu);

Add the ad hoc information describing success, to save the message request, the user is given prompt request.setAttribute in the page ( "message", "description add ad hoc success");

Returns the ad hoc management interface description

return "forward:/tianjiatesemiaoshu.action";

Ad hoc query module description:

The query is defined ad hoc module, click on the ad hoc management described in the sidebar, you can jump to the ad hoc management interface described in the background. Ad hoc query response module described in the page defined by tesemiaoshuguanli in tesemiaoshuController. Check out all the information in tesemiaoshuguanli, the return cycle through pages. Query method selectByexample method tesemiaoshudao in. The part of the core code is as follows:

Generating a description of the ad hoc sample class, query by example defined TesemiaoshuExample example = new TesemiaoshuExample ();

SelectByExample method by query of all ad hoc tesemiaoshudao description List tesemiaoshuall = tesemiaoshudao.selectByExample (example);

The ad hoc description information, stored in the request, on display request.setAttribute ( "tesemiaoshuall", tesemiaoshuall) foreach method by page;

Returns the ad hoc management interface description

return "forward:/tesemiaoshuguanli.action";

Ad hoc modification description module:

Click the Edit button, you can jump to the description of the ad hoc modification page. In the ad hoc modified page description, all of the information described in the initialization of the ad hoc, and the correspondence information corresponding to the edit field is filled. After editing the description of the ad hoc information page by encapsulating the data post method is described in an ad hoc entity, passed into the tesemiaoshuController. In xiugaitesemiaoshu the reception, after reception is completed, the call updateByPrimaryKeySelective method tesemiaoshuMapper modified. The part of the code as follows:

The ad hoc id corresponding modified by modifying the method described tesemiaoshudao tesemiaoshudao.updateByPrimaryKeySelective (tesemiaoshu);

The ad hoc modifications described the success of information, save the message request, the user is given prompt request.setAttribute in the page ( "message", "modify the description of a successful ad hoc");

Returns the ad hoc management interface description

return "forward:/tesemiaoshuguanli.action";

Delete ad hoc module description:

By a label on the page, shanchutesemiaoshu? Id = id will be passed to the background, the ad hoc reception by shanchutesemiaoshu description id. Use of deleteByid

Delete the ad hoc description, complete deletion. Delete the definition of a successful message, delete the ad hoc describe successful, and saved to the request, the part of the code is as follows:

Delete by deleting the corresponding methods described in the ad hoc id tesemiaoshudao according tesemiaoshudao.deleteByPrimaryKey (id);

Information will be deleted ad hoc describe success, to save the message request, the user is given prompt request.setAttribute in the page ( "message", "delete the ad hoc describe success");

Returns the ad hoc management interface description

return "forward:/tesemiaoshuguanli.action";

Guess you like

Origin www.cnblogs.com/bzls/p/11604469.html