CN101697119A - JavaBean class leading-in form based realization method of replacing traditional URL access address - Google Patents
JavaBean class leading-in form based realization method of replacing traditional URL access address Download PDFInfo
- Publication number
- CN101697119A CN101697119A CN200910035856A CN200910035856A CN101697119A CN 101697119 A CN101697119 A CN 101697119A CN 200910035856 A CN200910035856 A CN 200910035856A CN 200910035856 A CN200910035856 A CN 200910035856A CN 101697119 A CN101697119 A CN 101697119A
- Authority
- CN
- China
- Prior art keywords
- class
- javabean
- request
- database
- call
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
The invention relates to a JavaBean class leading-in form based realization method of replacing the traditional URL access address, comprising the following steps: adopting an IOC technique to realize URL address analysis; and then dynamically transferring defined service logic JavaBean to support the application of a B/S structure. The invention can clearly reflect the transferring of the service logic JavaBean through an access address way of the JavaBean class leading-in form without extra configuration, is simple and clear, can enhance the development efficiency of developers and effectively package the data access and respond the information output, thereby enhancing the automatic management function of a frame.
Description
Technical field
The invention belongs to telecom operators' service data information and represent the application technology category, especially import the implementation method that form replaces the traditional URL reference address based on the JavaBean class.
Background technology
Telecom operators are by years of development, and business operation support system and operation analysis system are more and more ripe, and the application of system is more and more wider, and can better embody telecom operation value.In order to make system healthy and strong more, and incorporate mainstream technology, telecommunications leader and system designer be except the application in the attention system, and also pay attention to technical realization.
Current telecommunications operation analysis system adopts J2EE lightweight Technical Architecture to realize, and has received the correlation technique of Web2.0.More and more pay attention to system's agility exploitation, be particular about technical loose coupling.Application kind in the current system is more and more, code is more and more, the application developer is very frequent to the increase work of application function, in order to promote development efficiency, embody the thought of agility exploitation, wherein the contact by the optimization URL reference address embodiment page and business logic processing is a mode of optimizing on the Technical Architecture on the B/S framework.
Summary of the invention
Goal of the invention:
During at the Web application and development, the mapping relations that need the configuration page and business logic processing make the problem that development efficiency reduces, this method pass through to adopt the JavaBean class to import the implementation that form replaces the traditional URL reference address, realize the optimization system Technical Architecture, promote application and development efficient.
Technical scheme:
A kind of implementation method based on JavaBean class importing form replacement traditional URL reference address, step comprises:
1) request of access control and address resolution
URL address information by page request, enter the controller that imports the technological frame (this technological frame as shown in Figure 1) of form reference address based on the JavaBean class, judge the request legitimacy, if by legal checking, parse addresses information (for example: class, method is obtained relevant meta information, required parameter, data access parameter etc.).
2) IOC mode dynamic call business logic processing
By the address information of having resolved, adopt IOC mechanism dynamic load JavaBean class, and call the business logic processing method.
3) database access is managed automatically
In dynamic loading type, need to judge whether database access.Database access if desired before the method for calling the JavaBean class, sets up database and connect so, and after method finished, destruction database connected.
4) tissue request return message
When request is returned, provide that page info returns, the automatic tissue of JSON data or XML data message.
Import based on the JavaBean class and done abstractly in the Technical Architecture of reference address of form at the JavaBean class of business logic processing, and provide the API of a cover solicited message tissue.
Done abstractly in the described Technical Architecture that imports the form reference address based on the JavaBean class at the JavaBean class of business logic processing, and provide the API of a cover solicited message tissue;
The class of described technological frame comprises:
MCActionServlet: be used for the controller action of user's request, whether check request information satisfies the requirement that this framework is resolved;
MCActioner: be used for generating the code of dynamic call, finish professional calling according to the metamessage of resolving;
GeneralModuler: the parent that is used for business processing;
LogicModuler: such is inherited in GeneralModuler, and the business logic processing of all non-database manipulations all is to need to inherit such;
IbatisDBModuler: such is inherited in GeneralModuler, and the business logic processing of all database manipulations all is to need to inherit such.
The application developer only need inherit the JavaBean abstract class that has encapsulated, realize concrete method for processing business, returning in information is to call the application and development that relevant API just can finish service logic part, and the reference address of hanging JavaBean class importing form in the page development just can articulate application seamless.
The reference address that adopts the JavaBean class to import form is exactly the routing information that embodies the JavaBean class of business logic processing in reference address information intuitively, simplify original mode that key-course need dispose in traditional MVC pattern, promote exploitation and maintenance efficiency, make the developer no longer need to dispose a lot of configuration files, just can finish articulating of application.
The reference address that adopts the JavaBean class to import form embodies on Technical Architecture, by abstract encapsulation, exposes relevant service logic loading interface, offers the exploitation that the developer finishes application.
From a report form showing, need the data on 20090801 dates of inquiry, the difference of this implementation and traditional URL reference address can embody from following Example:
Adopt the reference address of JavaBean class importing form as follows:
http://localhost:8080/lc.ReportModuler.queryDay(20090801).db(report).invoke
Adopt traditional reference address as follows:
http://localhost:8080/ReportDay.do?redDate=20090801
The reference address that adopts the JavaBean class to import form embodies this method of queryDay that the business logic processing mode is the lc.ReportModuler class clearly in the URL address of request, the parameter of importing into is 20090801, and the database of visit is the report storehouse.And traditional reference address, without any business logic processing information.For the developer, adopt the JavaBean class import form reference address exploitation and safeguard convenient directly perceived.
Beneficial effect of the present invention: the reference address mode by JavaBean class importing form, can clearly reflect calling of service logic JavaBean, need not additional configuration again, simple and clear, can promote developer's development efficiency.And effectively packaged data visit and response message output has promoted the framework function of management automatically.
Description of drawings
Fig. 1: the JavaBean class imports the framework process flow diagram that form is realized.
Embodiment
Below in conjunction with accompanying drawing and embodiment this method is described further.
A kind of implementation method based on JavaBean class importing form replacement traditional URL reference address, step comprises:
1) request of access control and address resolution
By the URL address information of page request, enter the controller of this technological frame, judge the request legitimacy, if by legal checking, parse addresses information is obtained relevant meta information (for example: class, method, required parameter, data access parameter etc.).
2) IOC mode dynamic call business logic processing
By the address information of having resolved, adopt IOC mechanism dynamic load JavaBean class, and call the business logic processing method.
3) database access is managed automatically
In dynamic loading type, need to judge whether database access.Database access if desired before the method for calling the JavaBean class, sets up database and connect so, and after method finished, destruction database connected.
4) tissue request return message
When request is returned, provide that page info returns, the automatic tissue of JSON data or XML data message.
With Fig. 1 is example, and the application of application developer exploitation will be according to as the framework flow process mode code among the figure, and wherein LogicModuler and IbattisModuler are the base class that the user realizes the service logic JavaBean of oneself.The technology that the application developer only need be familiar with following " package, import, public class, extends, public void, throws, this., this. " part realizes finishing the related application exploitation.
To manage daily paper be example to develop one now, and the application of this method is described.
Specifically:
The first step: write a JavaBean who inherits IbattisModuler, and the method for definition process service logic
QueryDay, as follows:
1 row package lc;
2 row import com.linkage.bace.ibatis.IbatisDBModuler;
3 row public class ReportModuler extends IbatisDBModuler{
4 row public void queryDay (String recDate) throws Exception{
5 row java.util.List list=this.getDAO () .queryPojoList (recDate);
6 row this.appendObject (" TableList ", list);
7 row this.toJSON ();
8 row }
9 row }
Wherein the 3rd row has defined business logic processing class ReportModuler, and such is inherited in IbatisDBModuler; The 4th row has defined report form inquiring method queryDay, and importing parameter into is the date; The 5th row calls the getDAO Query Database and obtains report messages; The output identification of the 6th row definition of data; The way of output of the 7th row definition of data is exported in the JSON mode.
Second step: be to call this method with the URL form in the page, method of calling is as follows:
http://localhost:8080/lc.ReportModuler.queryDay(20090801).db(report).invoke
Can generate map.
Wherein lc.ReportModuler represents it is the class of inheriting lbatisDBModuler, and queryDay (20090801) is a method wherein, and has parameter; Db (report) represents the Database Identification of visit, is used to generate the method for getDAO (); Invoke is the sign of JavaBean class lead-in mode.
Claims (3)
1. one kind imports the implementation method that form replaces the traditional URL reference address based on the JavaBean class, and step comprises:
1) request of access control and address resolution:
By the URL address information of page request, enter in the controller MCActionServlet class based on JavaBean class importing form reference address technological frame, at first judge this request legitimacy, promptly judge whether to satisfy current URL call format; If by legal checking, then parse addresses information is obtained relevant meta information;
2) IOC mode dynamic call business logic processing:
By the address information of having resolved, adopt IOC mechanism dynamic load JavaBean class, and call the business logic processing method:
The process of entire process realizes in MCActioner, at first according to the class name in the URL metamessage of having resolved, call the method instantiation class of the reflect of j2se, and then according to method name and parameter in the metamessage, this method of the method call dynamic instance class of the reflect of use j2se is also transmitted parameter, forms the dynamic load engineering of IOC mechanism;
3) database access is managed automatically:
In dynamic loading type, need to judge whether database access earlier, database access if desired before the method for calling the JavaBean class, sets up database and connect so, and after method finished, destruction database connected;
4) tissue request return message:
When request is returned, provide that page info returns, the automatic tissue of JSON data or XML data message.
2. the implementation method that imports form replacement traditional URL reference address based on the JavaBean class according to claim 1, it is characterized in that having done at the JavaBean class of business logic processing in the described Technical Architecture that imports the form reference address based on the JavaBean class abstract, and provide the API of a cover solicited message tissue;
The class of described technological frame comprises:
MCActionServlet: be used for the controller action of user's request, whether check request information satisfies the requirement that this framework is resolved;
MCActioner: be used for generating the code of dynamic call, finish professional calling according to the metamessage of resolving;
GeneralModuler: the parent that is used for business processing;
LogicModuler: such is inherited in GeneralModuler, and the business logic processing of all non-database manipulations all is to need to inherit such;
IbatisDBModuler: such is inherited in GeneralModuler, and the business logic processing of all database manipulations all is to need to inherit such.
3. the implementation method based on JavaBean class importing form replacement traditional URL reference address according to claim 1 is characterized in that relevant meta information comprises class in the described step 1), method, required parameter, data access parameter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910035856A CN101697119A (en) | 2009-10-12 | 2009-10-12 | JavaBean class leading-in form based realization method of replacing traditional URL access address |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910035856A CN101697119A (en) | 2009-10-12 | 2009-10-12 | JavaBean class leading-in form based realization method of replacing traditional URL access address |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101697119A true CN101697119A (en) | 2010-04-21 |
Family
ID=42142224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910035856A Pending CN101697119A (en) | 2009-10-12 | 2009-10-12 | JavaBean class leading-in form based realization method of replacing traditional URL access address |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101697119A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508674A (en) * | 2011-12-02 | 2012-06-20 | 方正国际软件有限公司 | Method based on JSON (javascript serialized object notation) for passing object-oriented parameters and system |
CN104580501A (en) * | 2015-01-23 | 2015-04-29 | 广东能龙教育股份有限公司 | Http interface dynamic publishing method and system based on reflex mechanism |
CN108595479A (en) * | 2018-03-13 | 2018-09-28 | 泰安协同软件有限公司 | Web request processing method based on unified Web entrances |
CN109842672A (en) * | 2018-12-13 | 2019-06-04 | 平安普惠企业管理有限公司 | Service request distribution method, device, computer equipment and storage medium |
CN110222318A (en) * | 2019-06-05 | 2019-09-10 | 卡斯柯信号(成都)有限公司 | Data generating tool development approach based on XML |
CN110554857A (en) * | 2018-05-30 | 2019-12-10 | 马上消费金融股份有限公司 | JavaBean generation method, device and system and readable storage medium |
CN112256351A (en) * | 2020-10-26 | 2021-01-22 | 卫宁健康科技集团股份有限公司 | Implementation method of Feign component, micro-service calling method and device |
-
2009
- 2009-10-12 CN CN200910035856A patent/CN101697119A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102508674A (en) * | 2011-12-02 | 2012-06-20 | 方正国际软件有限公司 | Method based on JSON (javascript serialized object notation) for passing object-oriented parameters and system |
CN104580501A (en) * | 2015-01-23 | 2015-04-29 | 广东能龙教育股份有限公司 | Http interface dynamic publishing method and system based on reflex mechanism |
CN108595479A (en) * | 2018-03-13 | 2018-09-28 | 泰安协同软件有限公司 | Web request processing method based on unified Web entrances |
CN108595479B (en) * | 2018-03-13 | 2021-07-27 | 泰安协同软件有限公司 | Web request processing method based on unified Web gateway |
CN110554857A (en) * | 2018-05-30 | 2019-12-10 | 马上消费金融股份有限公司 | JavaBean generation method, device and system and readable storage medium |
CN110554857B (en) * | 2018-05-30 | 2021-06-22 | 马上消费金融股份有限公司 | JavaBean generation method, device and system and readable storage medium |
CN109842672A (en) * | 2018-12-13 | 2019-06-04 | 平安普惠企业管理有限公司 | Service request distribution method, device, computer equipment and storage medium |
CN109842672B (en) * | 2018-12-13 | 2022-11-11 | 平安普惠企业管理有限公司 | Service request distribution method and device, computer equipment and storage medium |
CN110222318A (en) * | 2019-06-05 | 2019-09-10 | 卡斯柯信号(成都)有限公司 | Data generating tool development approach based on XML |
CN110222318B (en) * | 2019-06-05 | 2023-03-24 | 卡斯柯信号(成都)有限公司 | XML-based data generation tool development method |
CN112256351A (en) * | 2020-10-26 | 2021-01-22 | 卫宁健康科技集团股份有限公司 | Implementation method of Feign component, micro-service calling method and device |
CN112256351B (en) * | 2020-10-26 | 2023-11-17 | 卫宁健康科技集团股份有限公司 | Method for realizing Feign component, method and device for calling micro-service |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101408899B (en) | Method and apparatus for switching website multiple data sources | |
CN101697119A (en) | JavaBean class leading-in form based realization method of replacing traditional URL access address | |
CN101266542B (en) | Method and device for loading component in container | |
US7681203B2 (en) | Context-aware automatic service discovery and execution engine in mobile ad-hoc networks | |
CN102810057B (en) | A kind of method of log | |
CA2788899C (en) | Widget framework, real-time service orchestration, and real-time resource aggregation | |
CN102053860B (en) | CORBA-based OSGi distributed extensible system and method | |
US20050132381A1 (en) | Method and system for automatically generating service interfaces for a service oriented architecture | |
US7796014B2 (en) | Metadata-based configuration of RFID readers | |
KR100880536B1 (en) | Open framework system for heterogeneous computing and service integration | |
CN107729061A (en) | The modularization construction method of engineering project under a kind of ios platform | |
CN101246424A (en) | Menu automatic generation system and method for based on file | |
CN104899015A (en) | Service component management system and method thereof | |
US20070208832A1 (en) | RFID edge server allowing configuration updates without restart | |
JP2008530674A (en) | Process configuration in the network | |
CN101185303A (en) | System and method for creating a mapping document for binding messages between an application and an associated backend server | |
CN102591724A (en) | Method and device for information interaction | |
US20130141224A1 (en) | Epc provisioning system | |
CN100596139C (en) | System and method for building component applications using metadata defined mapping between message and data domains | |
CN102117203A (en) | Information management system based on Struts frame | |
CN102158490B (en) | Service switching method based on OSGi and device thereof | |
CN101588347A (en) | Method for automatically generating network service client terminal | |
CN102255961A (en) | Java 2 micro edition (J2ME)-based Web Service interface calling method | |
Sefid‐Dashti et al. | A reference architecture for mobile SOA | |
Cibrán et al. | Aspect-oriented programming for dynamic web service selection, integration and management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20100421 |