Take electronic commerce system configuration management as an example, teach you how to build JEESZ module project
1. Create table
Create table jeesz_eb_global_config for e-commerce system configuration
SET FOREIGN_KEY_CHECKS=0;
— Table structure for jeesz_eb_global_config
DROP TABLE IF EXISTS jeesz_eb_global_config
;
CREATE TABLE jeesz_eb_global_config
(
Id varchar(64) NOT NULL COMMENT ‘iD ‘,
Context_path vARCHar (20) DEFAULT NULL COMMENT ‘deploy path ‘,
Port int(11) DEFAULT NULL COMMENT ‘表 示 ‘,
Treaty longtext COMMENT ‘User agreement ‘,
Activescore int(11) NOT NULL COMMENT ‘activate ‘,
Def_img varchar(255) NOT NULL DEFAULT ‘/r/eb/u/no_picture. GIF ‘COMMENT
When default picture ‘,
Create_byvarchar (64) NOT NULL COMMENT ‘create_byvarchar ‘,
Create_date datetime NOT NULL COMMENT ‘create time ‘,
Update_by varchar(64) NOT NULL COMMENT ‘update_by varchar ‘,
Update_date datetime NOT NULL COMMENT ‘update_date ‘,
Remarks Varchar (255) DEFAULT NULL COMMENT ‘remarks ‘,
Del_flag char(1) NOT NULL DEFAULT ‘0’ COMMENT ‘delete ‘,
PRIMARY KEY (id
),
KEY jeesz_eb_global_config
(del_flag
)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=’jeesz ‘;
— Records of jeesz_eb_global_config
Note:
-
Table name changes
Create_by, create_date, update_BY, update_date, Remarks, del_flag
Do not omit these fields when creating a table.
1.2. Add service table configuration for driver solution
Click Next to configure the business table (mainly for SQL query conditions and page elements)
And then SAVE it
1.3. Add the generation scheme
Save and generate the code (I generated the code in D:/ SRC directory)
2. Create module projects
2.1. Create module projects according to their own business (I take EB as an example)
2.2 modify and configure the Module project
Because of the integrity and consistency of the project, the maven project generated by the tool is missing some source files, so you need to manually create the following:
Click OK to reorder the newly created file directories:
Adjusted results:
Modify the pom.xml file of the module project jeesz-core-EB:
The details are as follows:
druid
${druid.version}
mysql-connector-java
${mysql.driver.version}
runtime
com.oracle
ojdbc14
${oracle.driver.version}
runtime
net.sourceforge.jtds
jtds
${mssql.driver.version}
runtime
org.aspectj
aspectjrt
1.7.4
org.aspectj
aspectjweaver
1.7.4
cglib
cglib
3.1
com.sml.sz
jeesz-config
com.sml.sz
jeesz-framework
2.3 copy the generated code to the specified directory com.sml.sz.eb
Modify the pom. XML file of jeesz-project to add module dependencies
The following code
com.sml.sz
jeesz-core-eb
${project.version}
Modify the pom. XML file of jeesz-web-admin to add module dependencies
The following code
com.sml.sz
jeesz-core-eb
Copy the generated Controller file into the Web project
Copy the generated interface file into the Web project:
3. Create a menu and configure permissions
See my Favorite configuration for details
Function screenshots: