IDEA plug-in-based project seed engineering generation method and system
By embedding browsers in IDEA plug-in to access project creation services, abstract template projects and use Velocity template engine to generate seed projects, it solves the repetitive work and inefficiency of developers on low-code platforms when building Spring online projects. It has realized automatic implementation of enterprise development specifications and code hosting.
Patent Information
- Application Number
- CN202411023491.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-06
AI Technical Summary
On low-code platforms, developers are limited by their technical capabilities when building Spring online projects, and have a lot of repetitive work and low development efficiency problems. They cannot directly use Spring template projects to meet different development specifications within the enterprise.
By developing IDEA plug-in, the embedded browser accesses the project creation service, abstracts the template project and uses the Velocity template engine to replace the placeholder to generate seed projects, packages and uploads them to the code hosting tool, and automatically implements the enterprise development specifications.
Rapidly generate seed projects, reduce repetitive framework code, improve development efficiency, reduce development thresholds, realize code hosting, and meet different development specifications within the enterprise.
Smart Images

Figure CN119088350A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of seed engineering, and in particular to a project seed engineering generation method and system based on IDEA plug-in. Background Art
[0002] IDEA is a commonly used Java development tool in the industry. It supports automatic code prompts, completion, various version tools (git, svn), etc. It also supports the current mainstream technologies and frameworks, supports plug-in development, and expands IDE functions. The low-code platform provides visual layout tools such as interfaces, logic, and objects to complete a large amount of development work, which can reduce the uncertainty factors in the development process, improve development efficiency, and enable enterprises to reduce development costs, lower the threshold for technical personnel, quickly innovate applications, and achieve rapid trial and error and agile iteration. In the Spring online project construction website, you can create an initial project by selecting the project type, language, SpringBoot version, and other information on the visual page.
[0003] On the basis of the low-code platform, the operation of building a project by dragging and dropping is still affected by the technical ability of the developer himself, and there is uncertainty in development. The Spring online project can only be built based on the template project of the Spring framework. There are many types of projects in the enterprise, such as front-end, back-end, and components. Each project has a different development framework and needs to comply with different development specifications within the enterprise. It is impossible to directly use the Spring template project. There is a lot of repetitive work in the construction project, which makes it impossible for developers to focus on the development of the business code itself, reducing development efficiency. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, the present invention proposes a project seed engineering generation method based on IDEA plug-in. By developing an IDEA plug-in, a browser is embedded in the IDEA development tool to realize access to the project creation service in IDEA; a personalized seed project that meets the business needs of the enterprise is generated through a custom module and uploaded to a code hosting tool, so that the seed project can automatically land in the enterprise development specifications.
[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:
[0006] A project seed engineering generation method based on IDEA plug-in, characterized by comprising:
[0007] S1. Develop an IDEA plug-in, the IDEA plug-in is used to access the project creation service, the IDEA plug-in has an embedded browser;
[0008] S2. According to the business type abstract template engineering, add placeholders in the custom module of the template;
[0009] S3. Create custom service information in the project, replace placeholders with the Velocity template engine, and generate a seed project;
[0010] S4. Package and upload the seed project.
[0011] Furthermore, the project creation service includes a web page, and the web page is used to fill in custom information.
[0012] Furthermore, the abstract template engineering according to the business type, adding a placeholder in the custom module of the template, also includes:
[0013] Standardized development frameworks, directory structures, and dependent components are integrated into the template.
[0014] Furthermore, the integration of the standardized development framework, directory structure and dependent components into the template includes:
[0015] Design general directory structure and customize directory structure;
[0016] Design standard dependencies and customize dependency files.
[0017] Furthermore, the custom information for creating the service in the project includes: system identification, template type and project name.
[0018] Further, the packaging and uploading of the seed project includes:
[0019] Pack the seed project into a file and upload it to a code hosting tool;
[0020] Determine whether the seed project already exists in the local directory. If so, directly open the seed project in the IDE window; if not, download the seed project to the local according to the address of the code hosting tool and then open the seed project.
[0021] The present invention also relates to a project seed engineering generation system based on IDEA plug-in, characterized in that it includes:
[0022] A development module, used for developing an IDEA plug-in, wherein the IDEA plug-in is used for accessing a project creation service, and the IDEA plug-in has an embedded browser;
[0023] Abstract module, used to abstract template engineering according to business type and add placeholders in custom modules of the template;
[0024] A generation module is used to create service custom information in the project, replace placeholders with the Velocity template engine, and obtain a seed project;
[0025] The packaging module is used to package and upload the seed project.
[0026] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.
[0027] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;
[0028] The memory is used to store program instructions;
[0029] The processor is used to execute the above method by calling program instructions.
[0030] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.
[0031] The beneficial effects of the present invention are:
[0032] The project seed project generation method and system based on the IDEA plug-in of the present invention can quickly generate seed projects and realize code hosting. The present invention provides an IDEA plug-in, which realizes access to project creation services in IDEA through an embedded browser; through an abstract template project, a custom module is determined by using the Velocity template engine to generate a seed project, and the development specifications in the industry are automatically implemented, so that developers do not need to manually create warehouses and build initial projects, reduce a large amount of repetitive framework codes unrelated to the business, and improve development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 The present invention is a schematic diagram of the process of generating a project seed project based on the IDEA plug-in.
[0034] Figure 2 The present invention is a schematic diagram of the structure of a project seed engineering generation system based on the IDEA plug-in.
[0035] Figure 3 The figure is a schematic structural diagram of an electronic device of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. It should be understood that the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments, and these embodiments are only used to illustrate the present application and are not used to limit the scope of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0037] like Figure 1 As shown, the embodiment of the present invention discloses a project seed engineering generation method based on IDEA plug-in, and the steps of the process include:
[0038] Step S1. Develop an IDEA plug-in, where the IDEA plug-in is used to access a project creation service, and the IDEA plug-in has an embedded browser.
[0039] In this embodiment, the IDEA plug-in uses an embedded browser to access the web page of the project creation service in IDEA, and the web page is used to fill in custom information. Interactive functions can be implemented in the web page, and users can fill in custom information and submit data on the web page to realize communication between the IDEA plug-in and the project creation service, including sending HTTP requests and receiving response data.
[0040] This embodiment also includes testing and optimizing the IDEA plug-in function, testing the stability and accuracy of accessing the project creation service, and whether the embedded browser interacts normally, and optimizing the test results to ensure that the IDEA plug-in is normally available and provide a good user experience.
[0041] This embodiment provides a more convenient and quick way to access the project creation service, develops an IDEA plug-in, and enables users to customize information on the web page in the IDEA plug-in, thereby enhancing the functionality and practicality of the IDEA plug-in.
[0042] Step S2. According to the business type abstract template project, add a placeholder in the custom module of the template.
[0043] Specifically, design and create a variety of template projects in combination with business types, which can be implemented using tools such as Vue, Maven, and Gradle. By creating template projects, development efficiency can be improved, and project projects can be quickly customized and started in subsequent development. In the actual application process, since there are many types of projects in the enterprise, such as front-end, back-end, and components, each project has a different development framework and needs to comply with different development specifications within the enterprise. Therefore, it is necessary to abstract template projects based on different application and component types and business scenarios, build projects that can meet the needs of the enterprise, and reduce the repetitive work of developers in the process of building projects.
[0044] The custom module in the template is marked by a placeholder, which is used to fill in the personalized information later. In this embodiment, the placeholder can be represented in the form of ${placeholder}.
[0045] In this embodiment, it is also necessary to integrate the standardized development framework, directory structure and dependent components into the template, including:
[0046] Design general directory structure and customize directory structure;
[0047] Design standard dependencies and customize dependency files.
[0048] Specifically, you can use build tools such as Maven or Gradle to define a common project directory structure. For example, in a Java project, you can design a common directory structure src / main / java for source code, src / test / java for unit test code, and the resources directory for configuration files. Pre-defining a common directory structure in a template project can ensure the consistency and maintainability of the project.
[0049] For different business types or project requirements, you can customize the project directory structure according to specific requirements to meet the special needs of different projects. For example, for front-end projects, you can set src / assets to store static resources and src / components to store components.
[0050] Standard dependencies can specify the dependency libraries required by the project, and custom dependency files can specify additional dependency libraries and specific versions.
[0051] Integrating standardized development frameworks, directory structures, and dependent components into the template can help developers create and manage projects more efficiently, standardize project development processes, ensure project consistency and maintainability, and improve development efficiency.
[0052] Step S3: Create service custom information in the project, use the Velocity template engine to replace the placeholder, and generate a seed project.
[0053] In this embodiment, the input items of the project creation service include: system identification, template type and project name. In the project creation service, a web page is provided for filling in personalized information, including inputting system identification, template type and project name.
[0054] The template engine can separate views from data. In this template project, the Velocity template engine is used to process placeholders. The Velocity template engine can dynamically replace the placeholders in the template. Velocity is a Java-based template engine that can not only be used for interface display, but also generate Java code. Velocity also provides a template buffer mechanism. Every time a request occurs, there is no need to reload and parse the Velocity template file from the disk, which greatly improves the execution efficiency of the Velocity template engine.
[0055] Step S4: Pack and upload the seed project.
[0056] Specifically, step S4 also includes step S401 and step S402.
[0057] Step S401: Pack the seed project into a file format and upload it to a code hosting tool;
[0058] Step S402, determine whether the seed project already exists in the local directory, if it does, directly open the seed project in the IDE window; if it does not exist, download the seed project to the local according to the address of the code hosting tool and then open the seed project.
[0059] The code hosting tool may be a Git repository, through which file sharing may be achieved.
[0060] When users click the Open button of the project creation service in IDEA, they can download the seed project as the starting point of the project, reducing a lot of unnecessary repetitive work.
[0061] like Figure 2 As shown, the embodiment of the present invention discloses a project seed engineering generation system based on IDEA plug-in, and its structure includes:
[0062] A development module, used for developing an IDEA plug-in, wherein the IDEA plug-in is used for accessing a project creation service, and the IDEA plug-in has an embedded browser;
[0063] Abstract module, used to abstract template engineering according to business type and add placeholders in custom modules of the template;
[0064] A generation module is used to create service custom information in the project, replace placeholders with the Velocity template engine, and obtain a seed project;
[0065] The packaging module is used to package and upload the seed project.
[0066] By using this system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.
[0067] Embodiment 1
[0068] Taking the rapid construction of the MAVEN project as an example, the detailed workflow is as follows:
[0069] Step S1: Abstract standard engineering templates according to business types, such as WEB application templates and micro application templates.
[0070] Step S2: formulate a general directory structure, such as a web\service\domain directory under the src.main.java directory.
[0071] Step S3: formulate a custom directory structure. For example, if src.main.java must contain a system identification directory, it is represented by src.main.java.${appCode}.
[0072] Step S4: Create a standard pom file, such as specifying a parent tag <parent>, components that must be introduced <dependency>etc. tags.
[0073] Step S4: Create a custom part of the pom file, using $ as a placeholder. <artifactid>And other tags are: <artifactid> ${appCode}< / artifactid> .
[0074] Step S5: The project creation system provides a page for the user to input, such as system identification, project name, etc.
[0075] Step S6: Based on the page information filled in by the user, use the VELOCITY template engine to change the placeholders to user input items and generate a MAVEN project.
[0076] Step S7: Push the project to the code hosting tool.
[0077] Step S8: The user clicks the Open Project button in the IDE. If the project already exists in the local directory, execute step S9; otherwise, execute step S10.
[0078] Step S9: directly open the project in a new IDE window. If the project already exists in the local directory, execute step S9; otherwise, execute step S10.
[0079] Step S10: Download the project to the local computer according to the code hosting tool address, and open the project in a new IDE editing window.
[0080] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.
[0081] The embodiment of the present invention further provides an electronic device for executing the above method, as a device for implementing the method, and its structure is as follows: Figure 3 As shown, the electronic device 300 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may also include a display screen 305 for displaying images, or receiving user operation instructions when necessary.
[0082] The processor 301 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 304 may include a receiver and a transmitter. The transceiver 304 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.
[0083] Processor 301 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0084] The processor 301 may also include one or more processing units, for example, the processor 301 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 300. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 301 for storing instructions and data. In some embodiments, the memory in the processor 301 is a high-speed cache memory. The memory may store instructions or data that the processor 301 has just used or circulated. If the processor 301 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 301 is reduced, and the efficiency of the system is improved.
[0085] The processor 301 can run the project seed engineering generation method based on the IDEA plug-in provided in the embodiment of the present application, so as to reduce the user's operation complexity, improve the intelligence of the terminal device, and enhance the user's experience. The processor 301 can include different devices. For example, when the CPU and GPU are integrated, the CPU and GPU can cooperate to execute the method provided in the embodiment of the present application, such as part of the algorithm in the project seed engineering generation method is executed by the CPU, and the other part of the algorithm is executed by the GPU to obtain faster processing efficiency.
[0086] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0087] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0088] Optionally, the memory 303 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the method provided in any embodiment of the present application.
[0089] The memory 303 can be used to store computer executable program codes, which include instructions. The processor 301 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the memory 303. The memory 303 may include a program storage area and a data storage area. Among them, the program storage area may store the code of the operating system, application program, etc. The data storage area may store data created during the use of the electronic device 300 (such as images, videos, etc. collected by the camera application), etc.
[0090] The memory 303 may also store one or more computer programs corresponding to the method provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 303 and are configured to be executed by the one or more processors 301. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.
[0091] Of course, the code of the project seed engineering generation method based on the IDEA plug-in provided in the embodiment of the present application can also be stored in an external memory. In this case, the processor 301 can run the code stored in the external memory through the external memory interface, and the processor 301 can control the operation database configuration process.
[0092] The display screen 305 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 305, where N is a positive integer greater than 1. The display screen 305 can be used to display information input by a user or information provided to a user and various graphical user interfaces (GUI). For example, the display screen 305 can display photos, videos, web pages, or files.
[0093] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.
[0094] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.
[0096] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0098] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.< / artifactid> < / dependency> < / parent>
Claims
1. A project seed engineering generation method based on IDEA plug-in, characterized in that: include: S1. Develop an IDEA plug-in, the IDEA plug-in is used to access the project creation service, the IDEA plug-in has an embedded browser; S2. According to the business type abstract template engineering, add placeholders in the custom module of the template; S3. Create custom service information in the project, replace placeholders with the Velocity template engine, and generate a seed project; S4. Package and upload the seed project.
2. The method according to claim 1, characterized in that The project creation service includes a web page, and the web page is used to fill in custom information.
3. The method according to claim 1, characterized in that The abstract template engineering according to the business type, adding a placeholder in the custom module of the template, also includes: Standardized development frameworks, directory structures, and dependent components are integrated into the template.
4. The method according to claim 3, characterized in that The integration of the standardized development framework, directory structure and dependent components into the template includes: Design general directory structure and customize directory structure; Design standard dependencies and customize dependency files.
5. The method according to claim 1, characterized in that The custom information for creating the service in the project includes: system identification, template type and project name.
6. The method according to claim 1, characterized in that The step of packaging and uploading the seed project includes: Pack the seed project into a file and upload it to a code hosting tool; Determine whether the seed project already exists in the local directory. If so, directly open the seed project in the IDE window; if not, download the seed project to the local according to the address of the code hosting tool and then open the seed project.
7. A project seed engineering generation system based on IDEA plug-in, characterized in that: include: A development module, used for developing an IDEA plug-in, wherein the IDEA plug-in is used for accessing a project creation service, and the IDEA plug-in has an embedded browser; Abstract module, used to abstract template engineering according to business type and add placeholders in custom modules of the template; A generation module is used to create service custom information in the project, replace placeholders with the Velocity template engine, and obtain a seed project; The packaging module is used to package and upload the seed project.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store program instructions; The processor is configured to execute the method according to any one of claims 1 to 6 by calling program instructions.
10. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
