Database Access Simple Implementation EDAINFO-Model (1) - Brief Introduction

xiaoxiao2021-03-06  60

EDAINFO-Model is a database access component of this site. The biggest feature of this set is that in a commonly used operation, simply modify a XML file to implement transplant in several common databases (including Oracle, My SQL, SQL Server. And integrate Struts1.1 features, especially suitable for integrated development with Struts1.1, built-in a complete pagination package. In this component, several common graphics statistics of JFreechart are also encapsulated (pie chart, graph, histogram) operation.

EDAINFO-Model is based on EJB-based ideas, and maps the data sheet with an XML file. Of course, this is just a lightweight mapping, using the Data Access Object Dao design mode.

This component is roughly divided into the following packages:

1.Net.edainfo.db. *: This package belongs to the database access layer;

2.NET.EDAINFO.EXCEPTION. *: This package includes some important exceptions, mainly combined with Struts1.1;

3.Net.edainfo.filter. *: There is a filter in this package, which is a character conversion class for Tomcat knows;

4.Net.edaInfo. *: In using Struts1.1, you can replace the ActionServlet, as a startup load, everyone can inherit it in actual development;

5.Net.edainfo.security. *: No use;

6.NET.EDAINFO.TAGLIB. *: No use;

7.NET.EDAINFO.UTIL. *: Common toolkit. Including some common operations, such as partial packages, JFreeChart's packages, upload, MD5 encryption, JavaMail mail sending package, combined with Model can get all forms submitted by all forms, and there is also a inherited in struts1.1 The abstract class of org.apache.struts.action.Action, you can let Action directly inherited it directly, it completes more operations, such as obtaining a database connection, directly accessing the configuration parameters of the component;

8. In addition to classes, there are several important configuration files: in the root directory of the compressed package of the component, including the ApplicationResources_iso.Properties (ie, the resource profile, which contains several in this component to be used. Several configurations), DataSource.xml (data table mapping), init-config.xml (configuration parameters), TurnPage.JSP (used in paging).

This time mainly introduces here, continue next time.

EDAINFO-MODEL download address:

Http://localhost/download/listdownload/do? Operation = loading & access = stage & m_download_id = 9101133882500

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

New Post(0)