Software project construction method and device, electronic equipment and storage medium

By using information input options to generate target scaffolding in software development, it solves the time-consuming and error-prone problems of project initialization and infrastructure construction, and improves software development efficiency and team collaboration capabilities.

CN118626074APending Publication Date: 2024-09-10UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410860532.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

During the software development process, project initialization and infrastructure construction are time-consuming and error-prone, resulting in low software development efficiency.

Method used

Receive basic project information input by the user through display information input options, determine the matching target template, adjust template parameters to generate target scaffolding, and build software projects based on the target scaffolding, simplifying the project initialization and infrastructure construction process.

Benefits of technology

It improves software development efficiency, lowers development thresholds, promotes team collaboration and long-term project maintenance, and simplifies the configuration process during project construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626074A
    Figure CN118626074A
Patent Text Reader

Abstract

The invention provides a software project construction method and device, electronic equipment and a storage medium, and belongs to the technical field of software development, and the method comprises the steps that information input options are displayed, and the information input options are used for receiving project basic information, input by a user, of a to-be-created target scaffold; when project basic information of a target scaffold is received based on the information input option, determining a target template matched with the project basic information from a project template library; adjusting parameters of the target template based on the project basic information to generate a target scaffold; in response to an instruction to create a software item containing the target scaffold, the software item is constructed based on the target scaffold. Through the scheme, the configuration process of project initialization and other processes in the software project construction process is simplified, and the software development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of software development technology, and in particular, relates to a software project construction method, device, electronic device and storage medium. Background Art

[0002] In the software development process, project initialization and infrastructure construction are time-consuming and error-prone processes.

[0003] In order to simplify the project initialization and infrastructure construction process of new projects, developers developed SpringBoot as a Java development framework. The SpringBoot framework simplifies the initialization process of new projects and the process of building production-level applications that run independently of the infrastructure to a certain extent.

[0004] However, when initializing a new project through the SpringBoot framework, a lot of configuration is still required for the new project, resulting in low efficiency in software development. Summary of the invention

[0005] The purpose of this application is to provide a software project construction method, device, electronic device and storage medium, aiming to solve the problem of low efficiency of traditional software development.

[0006] A first aspect of an embodiment of the present application provides a method for constructing a software project, the method comprising:

[0007] Displaying an information input option, wherein the information input option is used to receive basic project information of the target scaffold to be created input by the user;

[0008] When basic project information of a target scaffold is received based on the information input option, a target template matching the basic project information is determined from a project template library;

[0009] Adjusting the parameters of the target template based on the basic information of the project to generate the target scaffolding;

[0010] In response to an instruction to create a software project including the target scaffolding, the software project is constructed based on the target scaffolding.

[0011] In some embodiments, the basic project information includes a project type; and determining a target template matching the basic project information from a project template library includes:

[0012] Determine the target project type of the target scaffold in the basic information of the project;

[0013] A target template whose project type is the target project type is selected from the project template library.

[0014] In some embodiments, before selecting a target template whose project type is the target project type from the project template library, the method further includes:

[0015] Determine the configuration files and basic code structures corresponding to each template, wherein the templates include multiple basic service templates, multiple microservice templates, and multiple interface templates;

[0016] Based on the configuration files and basic code files of each template, create project templates corresponding to each template;

[0017] The project templates corresponding to each template are respectively composed into the target template library.

[0018] In some embodiments, adjusting the parameters of the target template based on the basic information of the project to generate the target scaffold includes:

[0019] Determine the project name, required dependency library and database type of the target scaffold from the basic project information;

[0020] According to the project name, the dependent library and the database type, the template project structure in the target template is configured to obtain a standard project structure of the target scaffold;

[0021] According to the project name, the dependent library and the database type, folders and basic configuration files are preset in the standard project structure to obtain the target scaffolding.

[0022] In some embodiments, after presetting folders and basic configuration files in the standard project structure according to the project name, the dependent library, and the database type to obtain the target scaffold, the method further includes:

[0023] Determine the technology stack of the target scaffold from the basic information of the project;

[0024] A target dependency is added to the target scaffold through the technology stack, and the target dependency is used to implement the addition of a target functional component in the target scaffold.

[0025] In some embodiments, the display information input options include:

[0026] A scaffolding configuration interface is displayed, wherein the scaffolding configuration interface includes the information input option.

[0027] In some embodiments, before displaying the scaffolding configuration interface, the method further includes:

[0028] determining a user interface based on the information input options;

[0029] Setting the framework version, database type, security framework and log framework of the user interface;

[0030] The controller, service layer, data access layer and model class of the user interface are set based on the business module to obtain the scaffolding configuration interface.

[0031] A second aspect of an embodiment of the present application provides a software project construction device, the device comprising:

[0032] A display unit, used for displaying information input options, wherein the information input options are used for receiving basic project information of a target scaffold to be created input by a user;

[0033] A first determining unit is configured to determine a target template matching the project basic information from a project template library when receiving the project basic information of the target scaffold based on the information input option;

[0034] A first generating unit, configured to adjust the parameters of the target template based on the basic information of the project to generate the target scaffold;

[0035] The first creation unit is configured to construct a software project based on the target scaffold in response to an instruction to create a software project including the target scaffold.

[0036] In some embodiments, the basic project information includes a project type; the first determining unit is used to determine a target project type of the target scaffold in the basic project information; and select a target template whose project type is the target project type from the project template library.

[0037] In some embodiments, the apparatus further comprises:

[0038] A second determination unit is used to determine a configuration file and a basic code structure corresponding to each template, wherein the templates include a plurality of basic service templates, a plurality of microservice templates, and a plurality of interface templates;

[0039] A second creation unit is used to create a project template corresponding to each template based on the configuration file and the basic code file of each template;

[0040] The second generating unit is used to form the target template library by combining the project templates corresponding to each template.

[0041] In some embodiments, the first generation unit is used to determine the project name, required dependent libraries and database type of the target scaffolding from the basic information of the project; configure the template project structure in the target template according to the project name, the dependent libraries and the database type to obtain the standard project structure of the target scaffolding; preset folders and basic configuration files in the standard project structure according to the project name, the dependent libraries and the database type to obtain the target scaffolding.

[0042] In some embodiments, the apparatus further comprises:

[0043] A third determining unit, configured to determine a technology stack of the target scaffold from the basic project information;

[0044] An adding unit is used to add a target dependency to the target scaffold through the technology stack, and the target dependency is used to implement the addition of a target functional component in the target scaffold.

[0045] In some embodiments, the display unit is used to display a scaffold configuration interface, and the scaffold configuration interface includes the information input option.

[0046] In some embodiments, the apparatus further comprises:

[0047] A fourth determining unit, configured to determine a user interface based on the information input option;

[0048] A setting unit, used to set the framework version, database type, security framework and log framework of the user interface;

[0049] The setting unit is used to set the controller, service layer, data access layer and model class of the user interface based on the business module to obtain the scaffolding configuration interface.

[0050] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software project construction method as described above when executing the computer program.

[0051] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the software project construction method described above is implemented.

[0052] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0053] In the embodiment of the present application, by inputting information options that can interact with the user to the construction, and creating a scaffolding template library in advance, it is possible to select a corresponding template from the template library according to the basic information of the project input by the user, and then adjust the template to obtain a target scaffolding. When a software project needs to be created, the software project is created through the target scaffolding, so that the software project is constructed through the scaffolding, which simplifies the configuration process of the project initialization process and other processes during the software project construction process, and improves the efficiency of software development. In addition, by constructing a target scaffolding and using the target scaffolding to construct a software project, the efficiency of the software development life cycle is greatly improved, the development threshold is lowered, and it is conducive to team collaboration and long-term maintenance of the project. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic diagram of a software project construction system involved in a method for constructing a software project provided by an exemplary embodiment is shown;

[0055] Figure 2 A schematic diagram of a software project construction method provided by an exemplary embodiment is shown;

[0056] Figure 3 A schematic diagram of a software project construction method provided by an exemplary embodiment is shown;

[0057] Figure 4 A schematic diagram of the structure of a software project construction device provided by an exemplary embodiment is shown;

[0058] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0061] In the software development process, project initialization and infrastructure construction are time-consuming and error-prone processes. In order to simplify the project initialization and infrastructure construction process of new projects, developers developed Spring Boot as a Java development framework. The Spring Boot framework simplifies the initialization process of new projects and the process of building production-level applications that run independently of infrastructure to a certain extent.

[0062] However, when initializing a new project through the Spring Boot framework, a lot of configuration is still required for the new project, resulting in low efficiency in software development.

[0063] In order to improve the efficiency of software development, the present application provides a software project construction method, device, electronic device and storage medium. Figure 1 , which shows a schematic diagram of a software project construction system involved in a software project construction method provided by an exemplary embodiment. Figure 1 The system includes: a first electronic device and a server. The first electronic device 10 and the server 20 are in communication connection with each other.

[0064] Among them, the first electronic device 10 is used to interact with software developers so that the software developers can build a software project through the first electronic device 10. When the software developer builds a software project through the first electronic device 10, the electronic device first builds the target scaffolding required for the software project, and then builds the software project through the scaffolding built in advance. When the first electronic device 10 builds the target scaffolding required for the software project, it receives the basic information of the project input by the user for the user to build the target scaffolding, and sends a request to the server 20 based on the basic information of the project. The request is used to request a target template that matches the basic information of the project, build a target scaffolding based on the target template, and respond to an instruction to create a software project containing the target scaffolding, and construct the software project based on the target scaffolding structure.

[0065] The server 20 is used to store a project template library, and in response to an acquisition request sent by the first electronic device 10 , determines a target template that matches the basic project information carried in the acquisition request, and sends the target template to the first electronic device 10 .

[0066] One point that needs to be explained is that the project template library can also be stored in the first electronic device 10. Accordingly, the first electronic device 10 can determine the target template that matches the basic information of the project from the project template library stored in itself. In the embodiment of the present application, the storage location of the project template library is not specifically limited.

[0067] In some embodiments, the system also includes a second electronic device, which constructs a graphical interface or command line tool for interacting with software developers, and sends the graphical interface or command line tool to the first electronic device 10 so that the first electronic device 10 can provide software developers with an interactive interface for building a scaffold.

[0068] One point that needs to be explained is that the first electronic device 10 and the second electronic device can be the same electronic device or different electronic devices, and in the embodiments of the present application, there is no specific limitation on this. When the first electronic device 10 and the second electronic device are the same electronic device, after the electronic device generates an interactive interface for building a scaffold, the interactive interface is stored, and when a software developer needs to use the interactive interface, the interactive interface is called. When the first electronic device 10 and the second electronic device are different electronic devices, after the second electronic device generates an interactive interface for building a scaffold, the interactive interface is sent to the first electronic device 10, and accordingly, the first electronic device 10 stores the interactive interface sent by the second electronic device, and when the software developer needs to use the interactive interface, the interactive interface is called. Among them, the second electronic device can send the interactive interface directly to the first electronic device 10, and the second electronic device can also send the interactive interface to the server 20, and the server 20 sends the interactive interface to the first electronic device 10.

[0069] It should be noted that the first electronic device 10 can actively obtain the interactive interface from the server 20 or the second electronic device. In the embodiment of the present application, the manner in which the first electronic device 10 obtains the interactive interface is not specifically limited.

[0070] The following is a detailed description of the software project construction method provided by this application, see Figure 2 , which shows a flowchart of a software project construction method provided by an exemplary embodiment. As an example but not a limitation, the present application is applied to a first electronic device.

[0071] S201: The first electronic device displays an information input option, where the information input option is used to receive basic project information of a target scaffold to be created, input by a user.

[0072] The target scaffold is a functional module used to assist in building a software project, for example, a database access module, a security authentication module, a module supporting a target service, such as a Representational State Transfer (RESTful) service module, and the like.

[0073] The basic information of the project is the basic information used to represent the target scaffold to be constructed, for example, the project name, project type, required dependency library, database type, package name, file description and other information of the target scaffold. The information input option is used to receive the basic information of the project of the target scaffold to be created input by the user. In some embodiments, the information input option is a text input box, and the user can enter the corresponding basic information of the project in the text input box accordingly. In some embodiments, the information input option is an information selection box, and accordingly, when the user's departure operation for the information input option is received, the information input option displays a plurality of selectable information items, and the information item selected by the user is used as the basic information of the project received by the information input option.

[0074] In some embodiments, the information input option is displayed through a scaffold configuration interface. Accordingly, the first electronic device displays a scaffold configuration interface, and the scaffold configuration interface includes the information input option. The scaffold configuration interface can be an interface obtained by the first electronic device from a server or other electronic devices. Accordingly, the scaffold configuration interface can be an interface designed and developed by other developers, and in the embodiments of the present application, there is no specific limitation on this.

[0075] Prior to this step, the developer constructs the scaffolding configuration interface, and the process may be as follows: the first electronic device determines the user interface based on the information input option; sets the framework version, database type, security framework and log framework of the user interface; sets the controller, service layer, data access layer and model class of the user interface based on the business module to obtain the scaffolding configuration interface.

[0076] Developers design a user-friendly graphical interface or command line tool based on the information input options required to allow users to enter basic project information. Developers configure the user interface with publicly selectable technology stacks, such as framework versions (such as Spring Boot versions), database types, security frameworks, and log frameworks. Developers also configure corresponding business modules for the user interface, such as controllers (such as RESTful interface controllers), service layers, data access layers, and model classes. In this way, by building a user interface and configuring business modules, technology stack options, etc. for the user interface, a system framework and scaffolding configuration interface that can automatically generate scaffolding are provided to users, providing users with a more convenient and concise visual method for customizing target scaffolding. In addition, by building a system framework and scaffolding configuration interface that automatically generates scaffolding, developers are allowed to quickly create new projects according to their needs, shortening project startup time.

[0077] One point that needs to be explained is that the process of constructing the scaffolding configuration interface can be implemented by the first electronic device or by other electronic devices. In the embodiments of the present application, no specific limitation is made to this. Accordingly, when the scaffolding configuration interface is an interface constructed by the first electronic device, the first electronic device can store the scaffolding configuration interface locally, or send the scaffolding configuration interface to a server, which stores the scaffolding configuration interface. When the scaffolding configuration interface is an interface constructed by other electronic devices, other electronic devices can send the scaffolding configuration interface to the first electronic device or the server after constructing the scaffolding configuration interface.

[0078] S202: When basic project information of a target scaffold is received based on the information input option, the first electronic device determines a target template matching the basic project information from a project template library.

[0079] The project template library is a database containing a variety of project templates. In some embodiments, the project templates in the project template library are classified according to the project type. For example, the project type includes basic service templates, microservice templates, interface templates (such as RESTful Application Programming Interface (API) templates), etc. Correspondingly, the first electronic device can select the corresponding target template from the project template library according to the project type in the basic information of the project. That is, the basic information of the project includes the project type, and this step can be: the first electronic device determines the target project type of the target scaffolding in the basic information of the project; selects a target template whose project type is the target project type from the project template library.

[0080] Before this step, software developers need to build a project template library. The process of building the project template library can be as follows: the first electronic device determines the configuration file and basic code structure corresponding to each template, and the template includes multiple basic service templates, multiple microservice templates, and multiple interface templates; based on the configuration file and basic code file of each template, create a project template corresponding to each template; and organize the project templates corresponding to each template into the target template library.

[0081] In addition, the project templates in the project template library also include extensible code files for generating Java classes and configuration files for general or specific business scenarios when building the target scaffolding.

[0082] In this implementation, various types of project templates are pre-set, including but not limited to basic service templates, microservice templates, and interface templates. Each template contains a corresponding configuration file and a basic code structure. Among them, the configuration file and the basic code structure can set their versions as needed. For example, the configuration file and the basic code file can be the configuration file and the basic code file of the SpringBoot architecture. In this way, by adding the corresponding configuration files and basic code files to the project template in advance, the project template can use the Servlet container such as Tomcat that comes with the Spring Boot architecture, so that developers can focus on business logic development without having to deal with complex deployment configurations. In addition, the configuration files and the basic code structure can automatically adjust the application settings according to the project dependencies through the automatic configuration function, reducing a large amount of XML or properties file configuration work, and further improving the development efficiency of the software project.

[0083] One point that needs to be explained is that the process of constructing the project template library can be implemented by the first electronic device or by other electronic devices, and in the embodiments of the present application, no specific limitation is made to this. In addition, the project template library can be stored locally in the first electronic device, or the project template library can be stored in a server or a database, and in the embodiments of the present application, no specific limitation is made to this. Accordingly, when the project template library is a project template library constructed by the first electronic device, the first electronic device can store the project template library locally, or send the project template library to the server, and the server stores the project template library. When the project template library is a template library constructed by other electronic devices, other electronic devices can send the project template library to the first electronic device or the server after constructing the project template library.

[0084] S203: The first electronic device adjusts the parameters of the target template based on the basic information of the project to generate the target scaffold.

[0085] Based on the relevant information in the basic information of the project, the first electronic device adjusts the configuration files, basic code and other files in the target template, generates relevant codes through the template engine to fill the project template, and stores the generated code files in the corresponding directory so that the relevant code files can be called when running the target scaffolding.

[0086] S204: In response to an instruction to create a software project including the target scaffold, the first electronic device constructs the software project based on the target scaffold.

[0087] When a software project needs to be built, the user can trigger an instruction to create the software project through the first electronic device. When the software project is a software project that includes the target scaffolding, the first electronic device calls the target scaffolding to build the software project to initialize and run the software project.

[0088] In an embodiment of the present application, a target scaffold is generated under the Spring Boot architecture. Since the SpringBoot architecture has built-in application servers such as Tomcat, a complete startup class can be set in the target scaffold, so that the target scaffold can be imported and run in an integrated development environment (IDE) without the need for additional configuration of a Servlet container. In addition, the target scaffold can provide functions such as opinion running and packaging deployment, so that developers can use the target scaffold to quickly verify and deliver results on the software architecture, thereby improving the efficiency of software development.

[0089] For example, developers can customize plug-ins in the target scaffold to support specific business logic or frameworks, and these plug-ins can be called during the scaffold generation process to add additional functional modules. In some embodiments, the generated target scaffold can implement corresponding functions by adding corresponding dependencies in the project template. For example, the first electronic device determines the technology stack of the target scaffold from the basic information of the project; adds target dependencies to the target scaffold through the technology stack, and the target dependencies are used to implement the addition of target functional components in the target scaffold.

[0090] The technology stack may be the technology stack input by the user through the information input option when entering the basic information of the project. The first electronic device automatically adds the corresponding Spring Boot dependencies in the build file (pom.xml or build.gradle) according to the technology stack selected by the user to ensure that the corresponding functions are implemented in the target scaffolding. For example, if the dependency is a startup dependency, the first electronic device automatically adds the corresponding SpringBootStarter dependency in the build file according to the technology stack selected by the user. The Spring BootStarte dependency is used to ensure the immediate startup of the middleware or functional components required for the target scaffolding to achieve out-of-the-box use.

[0091] In this way, users can customize the startup items or templates of the target scaffolding to expand the functionality of building software projects, meeting the needs of specific business scenarios. Since only the corresponding dependencies need to be added, the integration of third-party libraries is also more convenient, improving the scalability of the target scaffolding.

[0092] For another example, you can add IDE plug-ins to the target scaffold, such as Eclipse-based development environment plug-ins (springsource-tool-suite, STS), IntelliJ IDEA's Spring Boot plug-in, etc. In this way, with the IDE plug-in, you can implement functions such as one-click operation and hot loading, thereby improving development efficiency and debugging convenience.

[0093] One thing that needs to be explained is that after the target scaffold is generated, the software developer can create a software project through the target scaffold. In the process of creating the software project, the software developer can also adjust and optimize the target scaffold. For example, according to user needs, a default continuous integration environment is configured for the target scaffold, such as Maven's Surefire Plugin or Gradle's Test task, so as to perform unit tests and integration tests. Alternatively, according to user needs, continuous integration (CI), continuous delivery (CD) and continuous deployment (CD), i.e. CI / CD tools (such as Jenkins, GitLabCI / CD, etc.) are set in the target scaffold. Since the Spring Boot project is usually closely integrated with Maven or Gradle build tools, CI / CD tools are added to the target scaffold. Since the target scaffold is automatically built, tested and deployed during the CI / CD process, the target scaffold is automatically built, tested and deployed.

[0094] In the embodiment of the present application, by inputting information options that can interact with the user to the construction, and creating a scaffolding template library in advance, it is possible to select a corresponding template from the template library according to the basic information of the project input by the user, and then adjust the template to obtain a target scaffolding. When a software project needs to be created, the software project is created through the target scaffolding, so that the software project is constructed through the scaffolding, which simplifies the configuration process of the project initialization process and other processes during the software project construction process, and improves the efficiency of software development. In addition, by constructing a target scaffolding and using the target scaffolding to construct a software project, the efficiency of the software development life cycle is greatly improved, the development threshold is lowered, and it is conducive to team collaboration and long-term maintenance of the project.

[0095] Furthermore, the Spring Boot-based software development rapid construction system implements a complete set of solutions from project initialization to rapid construction of basic functional modules, significantly improving the work efficiency and project consistency of the development team.

[0096] Furthermore, Spring Boot has good support for microservice architecture and cloud environment, and can be easily packaged into container images and deployed to platforms such as Docker or Kubernetes.

[0097] The following is a detailed introduction to the software project construction method provided by this application in conjunction with the generation process of the target scaffold. Figure 3 , which shows a flowchart of a software project construction method provided by an exemplary embodiment. As an example but not a limitation, the present application is applied to a first electronic device.

[0098] S301: The first electronic device displays an information input option, where the information input option is used to receive basic project information of a target scaffold to be created input by a user.

[0099] The principle of this step is the same as that of step S201 and will not be repeated here.

[0100] S302: When basic project information of a target scaffold is received based on the information input option, the first electronic device determines a target template matching the basic project information from a project template library.

[0101] The principle of this step is the same as that of step S202 and will not be repeated here.

[0102] S303, the first electronic device determines the project name, required dependent libraries and database type of the target scaffold from the basic information of the project.

[0103] The information input options also include input options for information such as project name, required dependent libraries and database type. In this step, the first electronic device parses the basic information of the project to obtain the project name, required dependent libraries and database type entered in the information input options.

[0104] S304: The first electronic device configures the template project structure in the target template according to the project name, the dependent library and the database type to obtain a standard project structure of the target scaffold.

[0105] The target template includes the target project structure corresponding to the project template. In this step, the first electronic device calls the service API of Spring Initializr or the locally encapsulated logic to generate the standard project structure of the target scaffolding according to the project name, required dependency libraries, database type and other information. When the target scaffolding is a scaffolding under the Spring Boot architecture, the standard project structure can be a standard Maven or Gradle project structure.

[0106] S305: The first electronic device presets a folder and a basic configuration file in the standard project structure according to the project name, the dependent library and the database type to obtain the target scaffold.

[0107] The first electronic device presets necessary folder structures and basic configuration files in the project according to the project name, the dependent library and the database type, for example, application.properties or application.yml in src / main / java and src / main / resources.

[0108] S306: In response to the instruction to create a software project including the target scaffold, the first electronic device constructs the software project based on the target scaffold.

[0109] The principle of this step is the same as that of step S204 and will not be repeated here.

[0110] In the embodiment of the present application, by inputting information options that can interact with the user to the construction, and creating a scaffolding template library in advance, it is possible to select a corresponding template from the template library according to the basic information of the project input by the user, and then adjust the template to obtain a target scaffolding. When a software project needs to be created, the software project is created through the target scaffolding, so that the software project is constructed through the scaffolding, which simplifies the configuration process of the project initialization process and other processes during the software project construction process, and improves the efficiency of software development. In addition, by constructing a target scaffolding and using the target scaffolding to construct a software project, the efficiency of the software development life cycle is greatly improved, the development threshold is lowered, and it is conducive to team collaboration and long-term maintenance of the project.

[0111] Furthermore, the Spring Boot-based software development rapid construction system implements a complete set of solutions from project initialization to rapid construction of basic functional modules, significantly improving the work efficiency and project consistency of the development team.

[0112] Furthermore, Spring Boot has good support for microservice architecture and cloud environment, and can be easily packaged into container images and deployed to platforms such as Docker or Kubernetes.

[0113] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0114] See also Figure 4 , which shows a schematic diagram of the structure of a software project construction device provided by the present application, and includes various units for executing various steps in the above embodiments, see Figure 4 , the software project construction device includes:

[0115] A display unit 401 is used to display an information input option, where the information input option is used to receive basic project information of a target scaffold to be created input by a user;

[0116] A first determining unit 402 is configured to determine a target template matching the basic information of the project from a project template library when basic information of the project of the target scaffold is received based on the information input option;

[0117] The first generating unit 403 is used to adjust the parameters of the target template based on the basic information of the project to generate the target scaffold;

[0118] The first creating unit 404 is configured to construct a software project based on the target scaffold in response to an instruction to create a software project including the target scaffold.

[0119] In some embodiments, the basic information of the project includes a project type; the first determining unit 402 is used to determine a target project type of the target scaffold in the basic information of the project; and select a target template whose project type is the target project type from the project template library.

[0120] In some embodiments, the apparatus further comprises:

[0121] A second determination unit is used to determine a configuration file and a basic code structure corresponding to each template, wherein the template includes a plurality of basic service templates, a plurality of microservice templates, and a plurality of interface templates;

[0122] A second creation unit is used to create a project template corresponding to each template based on the configuration file and the basic code file of each template;

[0123] The second generating unit is used to form the target template library by combining the project templates corresponding to each template.

[0124] In some embodiments, the first generation unit 403 is used to determine the project name, required dependency library and database type of the target scaffold from the basic information of the project; according to the project name, the dependency library and the database type, the template project structure in the target template is configured to obtain the standard project structure of the target scaffold; according to the project name, the dependency library and the database type, folders and basic configuration files are preset in the standard project structure to obtain the target scaffold.

[0125] In some embodiments, the apparatus further comprises:

[0126] A third determining unit is used to determine the technology stack of the target scaffold from the basic information of the project;

[0127] The adding unit is used to add a target dependency to the target scaffold through the technology stack, and the target dependency is used to realize adding a target functional component in the target scaffold.

[0128] In some embodiments, the display unit 401 is used to display a scaffold configuration interface, and the scaffold configuration interface includes the information input option.

[0129] In some embodiments, the apparatus further comprises:

[0130] A fourth determining unit, configured to determine a user interface based on the information input option;

[0131] A setting unit, used to set the framework version, database type, security framework and log framework of the user interface;

[0132] The setting unit is used to set the controller, service layer, data access layer and model class of the user interface based on the business module to obtain the scaffolding configuration interface.

[0133] In the embodiment of the present application, by inputting information options that can interact with the user to the construction, and creating a scaffolding template library in advance, it is possible to select a corresponding template from the template library according to the basic information of the project input by the user, and then adjust the template to obtain a target scaffolding. When a software project needs to be created, the software project is created through the target scaffolding, so that the software project is constructed through the scaffolding, which simplifies the configuration process of the project initialization process and other processes during the software project construction process, and improves the efficiency of software development. In addition, by constructing a target scaffolding and using the target scaffolding to construct a software project, the efficiency of the software development life cycle is greatly improved, the development threshold is lowered, and it is conducive to team collaboration and long-term maintenance of the project.

[0134] Figure 5 FIG. 1 is a schematic diagram of an electronic device provided by an exemplary embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a software project construction program. When the processor 50 executes the computer program 52, the steps in the above-mentioned various software project construction method embodiments are implemented, such as Figure 2 Alternatively, when the processor 50 executes the computer program 52, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 4 The functions of units 401 to 404 are shown.

[0135] Exemplarily, the computer program 52 may be divided into one or more units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 52 in the electronic device 5. For example, the computer program 52 may be divided into a display unit, a first determination unit, a first generation unit, and a first creation unit, and the specific functions of each module are as follows:

[0136] A display unit 401 is used to display an information input option, where the information input option is used to receive basic project information of a target scaffold to be created input by a user;

[0137] A first determining unit 402 is configured to determine a target template matching the basic information of the project from a project template library when basic information of the project of the target scaffold is received based on the information input option;

[0138] The first generating unit 403 is used to adjust the parameters of the target template based on the basic information of the project to generate the target scaffold;

[0139] The first creating unit 404 is configured to construct a software project based on the target scaffold in response to an instruction to create a software project including the target scaffold.

[0140] The electronic device 5 may be any electronic device with a control function. The electronic device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 5 may also include input and output devices, network access devices, buses, etc.

[0141] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0142] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0143] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0149] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0150] The embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0151] The embodiment of the present application also provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0152] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A software project construction method, characterized in that: The method comprises: Displaying an information input option, wherein the information input option is used to receive basic project information of the target scaffold to be created input by the user; When basic project information of a target scaffold is received based on the information input option, a target template matching the basic project information is determined from a project template library; Adjusting the parameters of the target template based on the basic information of the project to generate the target scaffolding; In response to an instruction to create a software project including the target scaffolding, the software project is constructed based on the target scaffolding.

2. The method according to claim 1, characterized in that The basic project information includes the project type; and determining the target template matching the basic project information from the project template library includes: Determine the target project type of the target scaffold in the basic information of the project; A target template whose project type is the target project type is selected from the project template library.

3. The method according to claim 2, characterized in that Before selecting a target template whose project type is the target project type from the project template library, the method further includes: Determine the configuration files and basic code structures corresponding to each template, wherein the templates include multiple basic service templates, multiple microservice templates, and multiple interface templates; Based on the configuration files and basic code files of each template, create project templates corresponding to each template; The project templates corresponding to each template are respectively composed into the target template library.

4. The method according to claim 1, characterized in that The adjusting the parameters of the target template based on the basic information of the project to generate the target scaffolding includes: Determine the project name, required dependency library and database type of the target scaffold from the basic project information; According to the project name, the dependent library and the database type, the template project structure in the target template is configured to obtain a standard project structure of the target scaffold; According to the project name, the dependent library and the database type, folders and basic configuration files are preset in the standard project structure to obtain the target scaffolding.

5. The method according to claim 4, characterized in that After presetting folders and basic configuration files in the standard project structure according to the project name, the dependent library and the database type to obtain the target scaffold, the method further includes: Determine the technology stack of the target scaffold from the basic information of the project; A target dependency is added to the target scaffold through the technology stack, and the target dependency is used to implement the addition of a target functional component in the target scaffold.

6. The method according to any one of claims 1 to 5, characterized in that: The display information input options include: A scaffolding configuration interface is displayed, wherein the scaffolding configuration interface includes the information input option.

7. The method according to claim 6, characterized in that Before displaying the scaffolding configuration interface, the method further includes: determining a user interface based on the information input options; Setting the framework version, database type, security framework and log framework of the user interface; The controller, service layer, data access layer and model class of the user interface are set based on the business module to obtain the scaffolding configuration interface.

8. A software project construction device, characterized in that: The device comprises: A display unit, used for displaying information input options, wherein the information input options are used for receiving basic project information of a target scaffold to be created input by a user; A determination unit, configured to determine a target template matching the project basic information from a project template library when receiving the project basic information of the target scaffold based on the information input option; A generating unit, configured to adjust the parameters of the target template based on the basic information of the project to generate the target scaffold; The creating unit is used to construct a software project based on the target scaffold in response to an instruction to create a software project including the target scaffold.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the software project construction method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the software project construction method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Method and system for automatically generating business APP of fusion terminal

    CN120723295A

  • Method and system for automatically generating service app of fusion terminal

    CN120723295B