CN112732240A - Method and device for generating Java component - Google Patents

Method and device for generating Java component Download PDF

Info

Publication number
CN112732240A
CN112732240A CN202110024528.2A CN202110024528A CN112732240A CN 112732240 A CN112732240 A CN 112732240A CN 202110024528 A CN202110024528 A CN 202110024528A CN 112732240 A CN112732240 A CN 112732240A
Authority
CN
China
Prior art keywords
module
preset
packet
component
development
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
Application number
CN202110024528.2A
Other languages
Chinese (zh)
Inventor
邵振军
刘炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110024528.2A priority Critical patent/CN112732240A/en
Publication of CN112732240A publication Critical patent/CN112732240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for generating a Java component, relates to the technical field of computers, and mainly aims to realize the quick construction of an enterprise-level development framework and improve the research and development efficiency by constructing a standard Java component. The main technical scheme of the invention is as follows: acquiring a preset development module according to a generation instruction of a target component, wherein the preset development module at least comprises a general module, a service module, a front-end controller module and a calling relation among the modules; loading the preset development module under a local Java development environment to obtain a module to be executed; receiving component information of a target component, and adding the component information into the module to be executed; and generating a target assembly by executing the module to be executed. The method is used for generating the standard Java component for building the enterprise-level development framework.

Description

Method and device for generating Java component
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating a Java component.
Background
In recent years, the need for interconnection between mobile applications and enterprises has arisen. The mobile application and the enterprise are interconnected, so that objects supported by the background service are expanded to multiple use scenes from the previous single Web application, and the requirements of each use scene on the background service are different. This not only increases the amount of response of the background service, but also increases the complexity of the background service. As market demand varies thousands, this requires developers to be able to respond quickly to the demand changes.
Java is an object-oriented programming language, not only absorbs various advantages of C + + language, but also abandons concepts such as multiple inheritance, pointers and the like which are difficult to understand in C + +, so that the Java language has two characteristics of strong function, simplicity and easiness in use. The Java language, which is representative of the static object-oriented programming language, excellently implements object-oriented theory, allowing programmers to perform complex programming in an elegant, mental manner. Java has the characteristics of simplicity, object-oriented property, distribution, robustness, safety, platform independence and portability, multithreading, dynamicity and the like. Java may write desktop applications, Web applications, distributed system and embedded system applications, etc.
The ecology of Java is perfect, and the open source community is very active, so that the Java is very suitable for enterprise-level development, particularly large Web systems. For the system in the internet industry at present, the scale is large, as the open source ecology of Java is active, the number of components and tools is large, developers can suffer from the troubles that the framework is not built in a standard manner, the components are not used in a standard manner, and the components are not used in a large number of components when developing application software, once the components are not used properly, the problems that bugs are introduced by three-party components in the system, the communication between the systems is difficult, the versions of the components are incompatible and the like can be caused, so that the delivery of the software is influenced.
Disclosure of Invention
In view of the above problems, the invention provides a method and a device for generating a Java component, and mainly aims to realize the quick construction of an enterprise-level development framework and improve the research and development efficiency by constructing a standard Java component.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in a first aspect, the present invention provides a method for generating a Java component, including:
acquiring a preset development module according to a generation instruction of a target component, wherein the preset development module at least comprises a general module, a service module, a front-end controller module and a calling relation among the modules;
loading the preset development module under a local Java development environment to obtain a module to be executed;
receiving component information of a target component, and adding the component information into the module to be executed;
and generating a target assembly by executing the module to be executed.
Preferably, the acquiring of the preset development module according to the generation instruction of the target component includes:
determining identification information of a preset development module according to the generation instruction, wherein the identification information at least comprises a module name and a version number;
searching whether the preset development module exists locally according to the identification information;
and if not, searching the preset development module from a preset database according to the identification information.
Preferably, the method further comprises:
creating the preset development module, setting a base packet, a constant packet and a utilis packet in the general module, setting an entry packet, a mapper packet, a service packet and a generator packet in the service module, and setting a Config packet, a controller packet and a handler packet in the front-end controller module;
and issuing the preset development module to a preset database.
Preferably, the creating of the preset development module includes:
setting a target component generation mode based on the general module, the service module and the front-end controller module, and constructing a preset development module, wherein the generation mode is used for determining a frame, a component and a corresponding version of the target component which are depended on in an application system;
and installing the preset development module in a local Java development environment according to an install command.
Preferably, the step of issuing the preset development module to a preset database includes:
and installing the preset development module in a preset database according to the deployment command.
In a second aspect, the present invention provides an apparatus for generating a Java component, the apparatus comprising:
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a preset development module according to a generation instruction of a target component, and the preset development module at least comprises a general module, a service module, a front-end controller module and a calling relationship among the modules;
the loading unit is used for loading the preset development module obtained by the obtaining unit under the local Java development environment to obtain a module to be executed;
the adding unit is used for receiving the component information of the target component and adding the component information into the module to be executed obtained by the loading unit;
and the generating unit is used for generating the target assembly by executing the module to be executed obtained by the adding unit.
Preferably, the acquiring unit includes:
the determining module is used for determining the identification information of a preset development module according to the generating instruction, wherein the identification information at least comprises a module name and a version number;
the searching module is used for locally searching whether the preset development module exists according to the identification information obtained by the determining module; and if not, searching the preset development module from a preset database according to the identification information.
Preferably, the apparatus further comprises:
a creating unit, configured to create the preset development module, set a base packet, a constant packet, and an utils packet in the general module, set an entity packet, a mapper packet, a service packet, and a generator packet in the service module, and set a Config packet, a controller packet, and a handler packet in the front-end controller module;
and the issuing unit is used for issuing the preset development module constructed by the creating unit to a preset database.
Preferably, the creating unit includes:
the setting module is used for setting a target component generation mode based on the general module, the service module and the front-end controller module and constructing a preset development module, wherein the generation mode is used for determining a frame, a component and a corresponding version of the target component in an application system;
and the creating module is used for installing the preset development module in a local Java development environment according to the install command.
Preferably, the creating module is further configured to install the preset development module in a preset database according to a deployment command.
In another aspect, the present invention further provides a processor, where the processor is configured to execute a program, where the program executes the method for generating a Java component according to the first aspect.
On the other hand, the present invention further provides a storage medium, where the storage medium is used for storing a computer program, where the computer program controls, when running, a device in which the storage medium is located to execute the method for generating a Java component according to the first aspect.
By means of the technical scheme, when the target component is developed in the Java development environment, the development tool applied to the target component to be generated can be standardized through the standard vertebra development components such as the universal module, the service module and the front-end controller module which are defined in the preset development module, the module to be executed is generated by loading the preset development module in the local Java development environment of developers, and the target component is generated by combining the module to be executed according to the input related component information of the target component. The target component can be applied by a developer to quickly build a system framework of enterprise-level application, and the developer can be helped to save time for technical type selection and component selection due to the fact that a standard development tool is set in the target component, and only the target component needs to be applied to realize code printing of specific services, so that application development efficiency is greatly improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for generating a Java component according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for generating Java components according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a Java component generation apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating another apparatus for generating a Java component according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a method for generating a Java component, which specifically comprises the following steps as shown in FIG. 1:
101. and acquiring a preset development module according to the generation instruction of the target component.
In this embodiment, the preset development module is a component template created correspondingly for different types of Java enterprise-level development components, and the component template is preset with required common functional components and conventional setting parameters of the components according to the development requirements of Java enterprise-level applications. The preset development module is a compiled component template, and the functional modules which must be contained in the preset development module comprise: the system comprises a general module, a service module, a front-end controller module and a calling relation among the modules, wherein the general module is provided with a general development tool and related parameters; the service module is mainly used for defining the structure of a service layer, dependence specification and other contents; the front-end controller module is used for defining the structure and the specification of an externally provided interface of an application and realizing the purpose of providing service interfaces for a terminal, a web section, a mobile phone end and the like; the calling relationship among the modules includes the association relationship among different functional modules or tools, and the association relationship between each functional module and external files, such as external database scripts, resource files, and the like.
In practical applications, developers can actively select a required preset development module according to the developed project, that is, the required preset development module is called by generating an instruction. Therefore, a developer can input identification information of a required preset development module in a development interface so as to trigger a generation instruction of a target component; when the developer does not know which preset development modules exist, the development interface can also provide a corresponding display interface for displaying the preset development modules which exist currently so that the developer can select the preset development modules, and the generation instruction of the target component is triggered according to the selection of the developer.
102. And loading a preset development module under the local Java development environment to obtain a module to be executed.
Because there is not only one preset development module, there may be differences of multiple versions in the preset development modules with the same function, after the developer determines the preset development module, the developer needs to load the preset development module in the local Java development environment of the developer, that is, the preset development module is installed in the local Java development environment, so as to adapt to the preset development module, and determine that the preset development module of the version can be applied in the current Java development environment.
103. And receiving the component information of the target component, and adding the component information into the module to be executed.
After the fact that the preset development module can be loaded in the local Java development environment is determined, it is indicated that a developer can quickly generate the target component through the module to be executed locally. At this time, the developer needs to input component information of the target component, such as a project name, a storage location, version information, etc. of the component, according to the specific development content, where the component information is a relevant parameter value of a specific parameter in the target component.
The specific way of adding the component information into the module to be executed includes, but is not limited to, uniformly inputting related parameters and corresponding parameter values by developers, automatically identifying the specific parameters by a program, adding the corresponding parameter values into the module to be executed, and prompting the developers to supplement the related parameter values if the parameter values of the necessary parameters are not added; or the necessary parameters can be displayed one by one, and the developer is prompted to fill in the parameter values corresponding to the parameters.
104. And generating the target assembly by executing the module to be executed.
After the necessary parameters are set, the developer can operate the module to be executed through the preset instruction, so that the target component is generated. The triggering of the preset instruction may be inputting a specific instruction, or may be implemented by a virtual key in the interactive interface, and the specific manner is not specifically limited in this embodiment.
Further, the module to be executed is executed or the preset instruction is triggered on the premise that the setting of the necessary parameters is completed, the set parameter values are correct, if the necessary parameters which are not set exist or the parameter values of the necessary parameters are incorrect, the developer is prompted that the input is wrong, and at the moment, the module to be executed or the preset instruction is triggered cannot be executed.
Based on the implementation manner shown in fig. 1, it can be seen that the method for generating a Java component according to the embodiment of the present invention is a development tool that can standardize a target component to be generated by a standard vertebra development component, such as a general module, a service module, a front-end controller module, and the like defined in a preset development module, when the target component is developed in a Java development environment, so as to implement a templated component development process. The preset development module is loaded under the local Java development environment of a developer to generate a module to be executed, and the target component is generated together by combining the module to be executed according to the input related component information of the target component, so that the component is constructed in a standardized manner. Developers can use the standardized target component to quickly build a system framework of enterprise-level application, and the problems that communication among systems cannot be achieved and components are incompatible due to the fact that the components are not standardized in application development are avoided. Moreover, as the standard development tool is set in the target component, the development personnel can be helped to save the time for technology type selection and component selection, and the specific service coding is realized only by applying the target component, so that the application development efficiency is greatly improved.
Further, on the basis of the embodiment shown in fig. 1, a detailed description will be given to a process of constructing a preset development module and generating a target component according to a preferred embodiment of the present invention, and specific steps of the process are shown in fig. 2, and the process includes:
201. and creating a preset development module.
The default development module needs to be created and compiled in advance. For Java enterprise-level application development, the preset development module constructed in this embodiment at least includes three main functional modules: the system comprises a general module java-common, a service module java-service and a front-end controller module java-web.
Wherein, mainly include among the general module: the base packet comprises basic message protocol definition, paging request basic configuration, bean conversion instance definition, return protocol definition and the like, and the interface basis is standardized through the definitions; the constant packet comprises a basic return code definition and a state definition; the utils package contains tool classes defined in the development of mapping tools, time tools, random tools, return results tools, and the like.
The service module mainly defines the structure, the dependency specification and the like of a service layer, and comprises the following components: the entry package contains basic test question definition, defines time, modifier and other general information, and developers can extend service attributes based on the definition; the mapper package contains the basic operation of the database and encapsulates the behavior of the database; the service package defines a core service interface and an implementation mode thereof; the generator package defines a program for generating basic codes from a database, the program can be directly operated, the basic codes such as entity classes, mapping classes, service classes and the like can be automatically generated, the codes can be directly operated, developers can modify the codes based on the codes, and the development time of the developers can be greatly saved.
The front-end controller module mainly defines the structure and the specification of an interface provided by the system to the outside, and provides service interfaces for a terminal, a web end, a mobile phone end and the like. The method specifically comprises the following steps: the Config packet contains security management such as basic authentication and access authority of the service; the controller packet comprises specific interface providing and exposing modes; the handler packet provides a unified exception handling and data conversion tool; the AppLauncher provides a start class, and all services can be started based on the program.
In addition, can also be provided with in presetting the development module: a pom file; a resources directory; dockerfile, docker-compound; mde file, etc. Specifically, the method comprises the following steps:
the pom file defines the system version, the version of the dependent library, including springboot, springclosed, java servlet, compilation plug-in, database driver, template rendering engine, serialization program and other versions, and the dependency between the versions.
The resources directory defines basic information of the application program, a log generation method, a log generation position and the like.
Dockerfile and docker-compound define a cloud native containerization deployment mode, developers do not need to care about containerization and deployment, and the system can automatically perform containerization management.
The README. md document defines the description of the system and the method of use.
In this embodiment, the preset development module is also a target component generation mode further set by a developer based on the contents of the universal module, the service module, the front-end controller module and the like, and defines the relevant descriptors and the project name definition mode and the like, so that the preset development module is constructed and completed. The generation mode of the target component is used for determining the frame, the component and the corresponding version and other content parameters which the target component depends on in the application system.
After the developer completes the creation of the preset development module locally, the preset development module can be installed and used in a local Java development environment, and specifically, the preset development module can be installed in the local Java development environment according to an install command so as to continue to generate a target component and develop a corresponding project.
202. And releasing the preset development module to a preset database.
For Java enterprise-level applications, the development of the Java enterprise-level applications often needs to be completed by cooperation of multiple developers, and in order to make target components generated by all developers more standard, the preset development module needs to be shared by all developers, so that the generated components have good compatibility. Therefore, in this embodiment, the preset development module created locally by the developer needs to be issued to the preset database, and in practical application, the preset development module can be installed in the preset database by executing a default command. The preset database is a database which can be accessed by all developers to obtain the preset development module.
203. And determining the identification information of the preset development module according to the generation instruction.
The identification information in this step at least includes the module name and version number of the preset development module. The identification information can be obtained by analyzing the generation instruction, and can also be determined according to the content input by a developer.
It should be noted that there is no necessary logical association between this step and the above steps 201 and 202, and the above two steps are processes of creating and releasing a preset development module for a developer, which is a preparation stage for generating a target component. Starting from the step, all developers generate the target component based on the preset development module created in the two steps.
204. And searching whether a preset development module exists locally according to the identification information.
In this step, when a certain developer needs to generate a target component, if the developer has previously applied the preset development module, or the developer is a creator of the preset development module, the developer may directly call the preset development module from the local, and if the developer uses the preset development module for the first time, that is, the developer cannot find the preset development module locally, step 205 is executed to find the preset development module from a preset database.
205. And searching a preset development module from a preset database according to the identification information.
Because each preset development module is created and then is issued to the preset database, when a new developer is added to a project, the developer needs to generate a target component and then can search the preset development module corresponding to the project by accessing the preset database, so that a standardized target component is generated.
206. And loading a preset development module under the local Java development environment to obtain a module to be executed.
207. And receiving the component information of the target component, and adding the component information into the module to be executed.
208. And generating the target assembly by executing the module to be executed.
The contents of the steps 206-208 are the same as those of the steps 102-104 in the embodiment of fig. 1, and are not described herein again.
Further, as an implementation of the method embodiments shown in fig. 1 to 4, an embodiment of the present invention provides a Java component generation apparatus, where the apparatus is used to implement fast construction of an enterprise-level development framework by constructing a standard Java component, so as to improve research and development efficiency. The embodiment of the apparatus corresponds to the foregoing method embodiment, and details in the foregoing method embodiment are not repeated in this embodiment for convenience of reading, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiment. As shown in fig. 3 in detail, the apparatus includes:
the acquiring unit 31 is configured to acquire a preset development module according to a generation instruction of a target component, where the preset development module at least includes a general module, a service module, a front-end controller module, and a call relationship between the modules;
the loading unit 32 is configured to load the preset development module obtained by the obtaining unit 31 in a local Java development environment to obtain a module to be executed;
an adding unit 33, configured to receive component information of a target component, and add the component information to the to-be-executed module obtained by the loading unit 32;
a generating unit 34, configured to generate a target component by executing the to-be-executed module obtained by the adding unit 33.
Further, as shown in fig. 4, the acquiring unit 31 includes:
the determining module 311 is configured to determine, according to the generating instruction, identification information of a preset development module, where the identification information at least includes a module name and a version number;
a searching module 312, configured to locally search whether the preset development module exists according to the identification information obtained by the determining module 311; and if not, searching the preset development module from a preset database according to the identification information.
Further, as shown in fig. 4, the apparatus further includes:
a creating unit 35, configured to create the preset development module, set a base packet, a control packet, and an utils packet in the general module, set an entry packet, a mapper packet, a service packet, and a generator packet in the service module, and set a Config packet, a controller packet, and a handler packet in the front-end controller module;
the issuing unit 36 is configured to issue the preset development module constructed by the creating unit 35 to a preset database.
Further, as shown in fig. 4, the creating unit 35 includes:
the setting module 351 is used for setting a target component generation mode based on the general module, the service module and the front-end controller module, and constructing a preset development module, wherein the generation mode is used for determining a frame, a component and a corresponding version of the target component in an application system;
a creating module 352, configured to install the preset development module in a local Java development environment according to an install command.
Further, the creating module 352 is further configured to install the preset development module in a preset database according to a deployment command.
Further, an embodiment of the present invention further provides a processor, where the processor is configured to execute a program, where the program executes the method for generating a Java component described in fig. 1-2 when running.
Further, an embodiment of the present invention further provides a storage medium, where the storage medium is used to store a computer program, where the computer program controls, when running, a device in which the storage medium is located to execute the method for generating a Java component described in fig. 1-2 above.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In addition, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A method of generating a Java component, the method comprising:
acquiring a preset development module according to a generation instruction of a target component, wherein the preset development module at least comprises a general module, a service module, a front-end controller module and a calling relation among the modules;
loading the preset development module under a local Java development environment to obtain a module to be executed;
receiving component information of a target component, and adding the component information into the module to be executed;
and generating a target assembly by executing the module to be executed.
2. The method of claim 1, wherein obtaining the preset development module according to the generation instruction of the target component comprises:
determining identification information of a preset development module according to the generation instruction, wherein the identification information at least comprises a module name and a version number;
searching whether the preset development module exists locally according to the identification information;
and if not, searching the preset development module from a preset database according to the identification information.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
creating the preset development module, setting a base packet, a constant packet and a utilis packet in the general module, setting an entry packet, a mapper packet, a service packet and a generator packet in the service module, and setting a Config packet, a controller packet and a handler packet in the front-end controller module;
and issuing the preset development module to a preset database.
4. The method of claim 3, wherein creating the pre-defined development module comprises:
setting a target component generation mode based on the general module, the service module and the front-end controller module, and constructing a preset development module, wherein the generation mode is used for determining a frame, a component and a corresponding version of the target component which are depended on in an application system;
and installing the preset development module in a local Java development environment according to an install command.
5. The method of claim 4, wherein publishing the pre-defined development module to a pre-defined database comprises:
and installing the preset development module in a preset database according to the deployment command.
6. An apparatus for generating a Java component, the apparatus comprising:
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a preset development module according to a generation instruction of a target component, and the preset development module at least comprises a general module, a service module, a front-end controller module and a calling relationship among the modules;
the loading unit is used for loading the preset development module obtained by the obtaining unit under the local Java development environment to obtain a module to be executed;
the adding unit is used for receiving the component information of the target component and adding the component information into the module to be executed obtained by the loading unit;
and the generating unit is used for generating the target assembly by executing the module to be executed obtained by the adding unit.
7. The apparatus of claim 6, wherein the obtaining unit comprises:
the determining module is used for determining the identification information of a preset development module according to the generating instruction, wherein the identification information at least comprises a module name and a version number;
the searching module is used for locally searching whether the preset development module exists according to the identification information obtained by the determining module; and if not, searching the preset development module from a preset database according to the identification information.
8. The apparatus of claim 6 or 7, further comprising:
a creating unit, configured to create the preset development module, set a base packet, a constant packet, and an utils packet in the general module, set an entity packet, a mapper packet, a service packet, and a generator packet in the service module, and set a Config packet, a controller packet, and a handler packet in the front-end controller module;
and the issuing unit is used for issuing the preset development module constructed by the creating unit to a preset database.
9. The apparatus of claim 8, wherein the creating unit comprises:
the setting module is used for setting a target component generation mode based on the general module, the service module and the front-end controller module and constructing a preset development module, wherein the generation mode is used for determining a frame, a component and a corresponding version of the target component in an application system;
and the creating module is used for installing the preset development module in a local Java development environment according to the install command.
10. The apparatus of claim 9, wherein the creation module is further configured to install the preset development module in a preset database according to a default command.
11. A processor, characterized in that the processor is configured to execute a program, wherein the program executes the method for generating a Java component according to any one of claims 1 to 5.
12. A storage medium for storing a computer program, wherein the computer program controls, when executed, an apparatus in which the storage medium is located to execute the method for generating a Java component according to any one of claims 1 to 5.
CN202110024528.2A 2021-01-08 2021-01-08 Method and device for generating Java component Pending CN112732240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110024528.2A CN112732240A (en) 2021-01-08 2021-01-08 Method and device for generating Java component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110024528.2A CN112732240A (en) 2021-01-08 2021-01-08 Method and device for generating Java component

Publications (1)

Publication Number Publication Date
CN112732240A true CN112732240A (en) 2021-04-30

Family

ID=75589884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110024528.2A Pending CN112732240A (en) 2021-01-08 2021-01-08 Method and device for generating Java component

Country Status (1)

Country Link
CN (1) CN112732240A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040050463A (en) * 2002-12-10 2004-06-16 한국전자통신연구원 Appratus and Method for Enterprise JavaBean Component Testing
US20080222600A1 (en) * 2007-03-08 2008-09-11 Samsung Electronics Co., Ltd. Apparatus and method for component-based software development
US20110191407A1 (en) * 2010-01-22 2011-08-04 The Regents Of The University Of California Web application development framework
CN105138312A (en) * 2014-06-05 2015-12-09 阿里巴巴集团控股有限公司 Table generation method and apparatus
CN107766046A (en) * 2017-10-20 2018-03-06 江苏电力信息技术有限公司 A kind of built modular method based on mobility framework
CN110908665A (en) * 2019-10-29 2020-03-24 福建天泉教育科技有限公司 Jenkins construction plug-in development optimization method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040050463A (en) * 2002-12-10 2004-06-16 한국전자통신연구원 Appratus and Method for Enterprise JavaBean Component Testing
US20080222600A1 (en) * 2007-03-08 2008-09-11 Samsung Electronics Co., Ltd. Apparatus and method for component-based software development
US20110191407A1 (en) * 2010-01-22 2011-08-04 The Regents Of The University Of California Web application development framework
CN105138312A (en) * 2014-06-05 2015-12-09 阿里巴巴集团控股有限公司 Table generation method and apparatus
CN107766046A (en) * 2017-10-20 2018-03-06 江苏电力信息技术有限公司 A kind of built modular method based on mobility framework
CN110908665A (en) * 2019-10-29 2020-03-24 福建天泉教育科技有限公司 Jenkins construction plug-in development optimization method and system

Similar Documents

Publication Publication Date Title
KR101795844B1 (en) Runtime system
CN108964968B (en) Service access management method and system in container cloud environment
CN112748908B (en) Method and device for developing Restful service based on SSM framework
CN110912724A (en) Parameter-driven automatic service arrangement method and device
CN113127098B (en) Application program creation method based on micro-service architecture and related equipment
CN110727440A (en) Software packaging method
CN113094028B (en) Windows desktop program development system, method and related components
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN112114890A (en) Method, device and equipment for processing small program and storage medium
CN111506314A (en) Project development method, device, server and medium
CN111399840A (en) Module development method and device
CN111736810A (en) Method for dynamically creating node of docker container to execute task based on jenkins real-time task
CN112256249A (en) Method and equipment for expanding Android system function and computer storage medium
CN112596746B (en) Application installation package generation method and device, computer equipment and storage medium
CN117093352B (en) Template-based computing cluster job scheduling system, method and device
CN112328241B (en) Method and device for creating Android library module dependency relationship in application program development
CN106775608B (en) Method and device for realizing independent system process
US10558345B2 (en) User interface development in a transcompiling environment
CN111488144A (en) Data processing method and equipment
CN111338638A (en) System and method for realizing automatic generation of communication between embedded software components
CN110806891A (en) Method and device for generating software version of embedded equipment
CN116755788A (en) On-line rule modification method, device, equipment and storage medium
CN112732240A (en) Method and device for generating Java component
CN114416202B (en) Mobile terminal SDK calling method and system
CN112214213B (en) Linux kernel development and management method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination