Practical EDAEAGLE - Personal Account Management System (1)

xiaoxiao2021-03-06  39

Click here to download edaeagle

Click here to download your personal account management source code

EDAEAGLE, the original eDAINFO-Model, now trying to renamed eDAeagle, Eagle is the meaning of the eagle, I hope that the parts can be fly like an eagle. I hope that everyone will more valuable, let EdaEagle will be more beautiful tomorrow.

Click here for details on eDAEAGLE

This personal account management system, named Account, with actual use, you can manage your personal income expenditure (support multi-user), and can statistically, graph analysis and other functions. Download file decompression, including two Directory, SRC (Source) and WebApp (Page and Profile), you need to add the following packages: log4j, struts1.1 related packages, JFreeChart, edaeagle, jdom, and JDBC packages for databases. There is also a Database.sql, which is an Account's data sheet script, which is imported into the database, and the server is best to use Tomcat5.x. The data table structure is as follows:

1. ACT_USER:

CREATE TABLE [ACT_USER]

[user_id] [varchar] (13) Not null,

[user_name] [varchar] (30) NULL,

[user_password] [char] (32) NULL

) On [primary]

2. ACT_CATEGORY (Account Table):

CREATE TABLE [ACT_CATERY]

[CATERY_ID] [varchar] (13) Not null,

[catry_name] [varchar] (30) NULL,

[CATERY_TYPE] [char] (1) NULL,

[CATERY_DESCRIPTION] [varchar] (200) NULL,

[CATERY_USERID] [varchar] (13) NULL

) On [primary]

3. ACT_TAB (Account Table):

CREATE TABLE [ACT_TAB]

[Tab_ID] [varchar] (13) Not null,

[Tab_CATERYID] [varchar] (13) NULL,

[Tab_Money] [Numeric] (19, 4) Null,

[tab_date] NULL,

[Tab_Description] [varchar] (200) NULL

) On [primary]

The structure of the table is simple, and it will not be introduced here. The default user is Lin Fei, the password is 123456, the home page is /default.do. Let's take a detail below:

First, configure edaeagle:

1. Init-config.xml: For this file, I have already introduced it before, please refer to the previous article (edainfo-model), here you need to modify your database type and data source;

2. DataSource.xml: Please refer to the previous article (edainfo-model), and no modification is required.

3. Web.xml: Struts action must be set to Net.edainfo.init.initiatorServlet, so edaeagle will take effect, and you can reload the Struts configuration and edaeagle configuration files using this component.

Second, configure Struts:

It has assumed that you are a person familiar with Struts, so don't do a detailed description, the file has also been configured. It is important to note that in Struts-config.xml, there is an Action named Reload, which is executed on the page, which can reload the Struts configuration and the EDAEAGLE configuration file, and do not need to restart the server. Third, SRC directory structure:

MISC is ApplicationResources.properties, the Struts property file, in Chinese, modify in ApplicationResources_iso.Properties, then native2ascii -encoding GB2312, the specific steps are not described.

Net / edainfo / account is the source code of Account, Action is an action, Exception is an exception class, and the form is Action, and they inherited in DynavalidatorForm, IMPL is the logic layer, Model is DBModel.

Source code introduction:

First, Model:

This package contains three files: categorymodel.java, tabmodel.java, and usermodel.java, the three tables of Model, they inherited in dbmodel, constructor parameters are Map Database, he is loaded when the server is started The content is the content in DataSource.xml. There are corresponding GET / SET methods in these models.

Second, Exception:

This package has four exception classes, they inherited Net.edaInfo.exception.BaseException, do not introduce them;

Third, FORM:

The three forms of ACT_TAB, because of the special, inherited in DynavalidatorForm, made some special processing, the Form-bean in Struts-Config.xml declared these forms, please pay attention.

Here, an Form-TabForm is specifically introduced, the other two are similar, but it is a bit different on the verification:

Two methods are included in the TabForm: public void initialize (actionMapping, httpserviling mapping, httpservletRequest), the second method is to verify, the specific source code is already, do not introduce, here, here, inTIAALIZE:

Initialize method, it is a method in DynavalidatorForm. Since Tabform is special, in practice, there will be such a situation: that is, there are many uncertain factors such as the amount, description, etc. (maybe I am here. Not clear, everyone can run the program, enter the look), use dynamic forms that cannot be completed, so it is necessary to declare the amount, description, and category ID as an array, and this is a initialization problem, so These arrays were initialized in this method. Maybe there is a better solution, if you know, please tell me :). Here is an array of three lengths of 20. When your actual category is greater than 20, the run this case will be wrong. Please initialize a few arrays :) Sorry, I will introduce this, it has been in the morning. 3:30, I am going to sleep, see it next time! Please pay attention to Easy, pay attention to edaeagle, don't write this article, thank you!

转载请注明原文地址:https://www.9cbs.com/read-75831.html

New Post(0)