Plug-in type government affair software development and deployment method and system based on spring
Through the Spring-based plug-in development and deployment method, the problems of service interruption, complex updates and poor scalability in traditional government software development and deployment methods are solved, and the high availability and flexibility of government software are realized, and the modern government service is met. need.
Patent Information
- Application Number
- CN202411398381.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-02-11
AI Technical Summary
The development and deployment methods of traditional government software have problems such as service interruption, complex updates, and poor scalability, which is difficult to meet the needs of modern government services for high availability and flexibility.
Adopting Spring-based plug-in development deployment methods, improve system flexibility and high availability by creating independent Spring Boot plug-in projects, using Feign for communication, registering and managing plug-ins in Nacos, and implementing hot deployment and rollback operations.
It realizes the flexibility and high availability of government software, reduces the coupling between modules, improves development efficiency and code reuse, reduces downtime during deployment and updates, and meets the needs of modern government services.
Smart Images

Figure CN119415167A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to a method and system for developing and deploying plug-in government affairs software based on Spring. Background Art
[0002] In the development and deployment methods of traditional government software, cold deployment requires downtime, resulting in service interruptions, affecting the continuity of government services and user experience. The cold deployment process is cumbersome and time-consuming, and the update and rollback operations are complex and difficult to automate, which increases the difficulty of system maintenance. In addition, in the traditional development method, the functional modules are highly coupled, the scalability is poor, and the code is difficult to reuse. Functional updates require modifying the entire system, which consumes a lot of manpower and time, and increases the risk of errors. Government software has high requirements for high availability and stability. The shortcomings of traditional development and cold deployment significantly limit the flexibility and responsiveness of the system, making it difficult to meet the needs of modern government services.
[0003] How to improve the flexibility and high availability of government software is a technical problem that needs to be solved. Summary of the invention
[0004] The technical task of the present invention is to address the above shortcomings and provide a Spring-based plug-in government software development and deployment method and system to solve the technical problem of how to improve the flexibility and high availability of government software.
[0005] In a first aspect, the present invention provides a plug-in government software development and deployment method based on Spring, comprising the following steps:
[0006] Plug-in creation and development: Create a new version of the plug-in project to form a plug-in-based government software. Each plug-in project is an independent Spring Boot project, and plug-ins can communicate with each other through Feign.
[0007] Plug-in integration debugging: Install the plug-in into the runner of the main container for integration testing and debugging. The runner of the main container provides management services for the plug-in.
[0008] Plug-in packaging management: After the plug-in is debugged normally in the runner of the main container, the plug-in is packaged into a plug-in package file in jar format. The plug-in package file contains all the code and dependencies of the plug-in, and the version number of the plug-in is marked on the plug-in package file;
[0009] Plug-in deployment: upload the plug-in package file to the runner of the formal environment. The runner of the formal environment provides management services for the plug-in. The plug-in is registered in nacos based on its address in the formal environment. Nacos monitors its connection status with the plug-in based on the heartbeat mechanism.
[0010] Plugin testing: Load the new version of the plugin in the official environment through hot deployment, and test the plugin to verify whether the function and performance of the plugin meet expectations;
[0011] Plug-in release: If the plug-in fails the test, the runner-based management service will roll back the plug-in to the previous version. Correspondingly, nacos will unregister the local corresponding version of the plug-in. If the plug-in passes the test, the plug-in will be released and put into use, and the corresponding plug-in creation and development, plug-in integration debugging, plug-in packaging management, plug-in deployment, plug-in testing, and plug-in release operation records will be stored as operation logs.
[0012] Preferably, when creating a new version of a plug-in project, the required framework and functional modules, including MySQL, Elasticsearch, and Oracle, are integrated into the plug-in project.
[0013] As a preference, after uploading the plug-in package file to the runner of the formal environment, the uploaded plug-in is subjected to permission control and review. After passing the review, the plug-in is loaded by hot deployment.
[0014] Preferably, when the plug-in communicates with the accessed plug-in as an access plug-in, the access plug-in calls nacos and searches for the address of the accessed plug-in from nacos. The access plug-in communicates with the accessed plug-in through Feign communication based on the searched address.
[0015] As a preferred option, for the main container and the runner of the formal environment, the runner is a cloud application platform. The cloud platform interacts with the outside world through a visual management interface. The plug-in management interface is configured with a navigation bar. The navigation bar deploys the basic configuration service, cost management service, plug-in management service, and data management service of the plug-in, and is configured with plug-in creation and plug-in selection buttons. The newly created plug-in is imported through the plug-in creation button, and the list is selected from the plug-in list through the selection button to perform operations;
[0016] The management interface displays the basic information of all plug-ins in the form of a plug-in list. The basic information includes plug-in code, plug-in name, plug-in type, latest version, normal / total number and operation, as well as the operation column. The plug-in code is the unique identifier of each plug-in, which is used to distinguish different plug-ins. The plug-in name is used to intuitively display the function and purpose of the plug-in. The plug-in type is used to indicate the classification of the plug-in or the functional module to which it belongs, which is convenient for management and search; the latest version is used to display the version number of the current plug-in. The normal / total number column is used to display the operation status of the plug-in instance. The green number indicates the number of normally running instances, and the gray number indicates the total number of instances. The operation column is used to manage and operate the function buttons for the plug-in. The function buttons include edit, upload and run.
[0017] In a second aspect, the present invention provides a plug-in-based government software development and deployment system based on Spring, which implements the development and deployment of government software through a plug-in-based government software development and deployment method based on Spring as described in any one of the first aspects, and the system includes a plug-in creation and development module, a plug-in integration and debugging module, a plug-in packaging management module, a plug-in deployment module, a plug-in testing module, and a plug-in publishing module;
[0018] The plugin creation development module is used to perform the following: create a new version of the plugin project to form a plugin-based government software. Each plugin project is an independent Spring Boot project, and plugins can communicate with each other through Feign.
[0019] The plug-in integration debugging module is used to perform the following: install the plug-in into the runner of the main container for integration testing and debugging, and the runner of the main container provides management services for the plug-in;
[0020] The plug-in packaging management module is used to perform the following: After the plug-in is debugged normally in the runner of the main container, the plug-in is packaged into a plug-in packaging file in jar format. The plug-in packaging file contains all the code and dependencies of the plug-in, and the version number of the plug-in is marked on the plug-in packaging file;
[0021] The plugin deployment module is used to perform the following: upload the plugin package file to the runner of the formal environment, the runner of the formal environment provides management services for the plugin, the plugin is registered in nacos based on its address in the formal environment, and nacos monitors its connection status with the plugin based on the heartbeat mechanism;
[0022] The plug-in test module is used to perform the following operations: load the new version of the plug-in through hot deployment in the official environment, and test the plug-in to verify whether the function and performance of the plug-in meet expectations;
[0023] The plug-in release module is used to perform the following: If the plug-in fails the test, the runner-based management service performs a rollback operation on the plug-in and rolls the plug-in back to the previous version. Correspondingly, nacos deregisters the local corresponding version of the plug-in. If the plug-in passes the test, the plug-in is released and put into use, and the corresponding plug-in creation and development, plug-in integration debugging, plug-in packaging management, plug-in deployment, plug-in testing, and plug-in release operation records are stored as operation logs.
[0024] Preferably, when creating a new version of a plug-in project, the plug-in creation development module is used to integrate the required framework and functional modules, including MySQL, Elasticsearch, and Oracle, into the plug-in project.
[0025] Preferably, after uploading the plug-in package file to the runner of the formal environment, the plug-in package management module performs permission control and review on the uploaded plug-in. After passing the review, the plug-in deployment module is used to load the plug-in by hot deployment.
[0026] Preferably, when the plug-in communicates with the accessed plug-in as an access plug-in, the access plug-in calls nacos and searches for the address of the accessed plug-in from nacos. The access plug-in communicates with the accessed plug-in through Feign communication based on the searched address.
[0027] As a preferred option, for the main container and the runner of the formal environment, the runner is a cloud application platform. The cloud platform interacts with the outside world through a visual management interface. The plug-in management interface is configured with a navigation bar. The navigation bar deploys the basic configuration service, cost management service, plug-in management service, and data management service of the plug-in, and is configured with plug-in creation and plug-in selection buttons. The newly created plug-in is imported through the plug-in creation button, and the list is selected from the plug-in list through the selection button to perform operations;
[0028] The management interface displays the basic information of all plug-ins in the form of a plug-in list. The basic information includes plug-in code, plug-in name, plug-in type, latest version, normal / total number and operation, as well as the operation column. The plug-in code is the unique identifier of each plug-in, which is used to distinguish different plug-ins. The plug-in name is used to intuitively display the function and purpose of the plug-in. The plug-in type is used to indicate the classification of the plug-in or the functional module to which it belongs, which is convenient for management and search; the latest version is used to display the version number of the current plug-in. The normal / total number column is used to display the operation status of the plug-in instance. The green number indicates the number of normally running instances, and the gray number indicates the total number of instances. The operation column is used to manage and operate the function buttons for the plug-in. The function buttons include edit, upload and run.
[0029] The Spring-based plug-in government software development and deployment method and system of the present invention have the following advantages: combining the advantages of plug-in development and hot deployment, the flexibility and high availability of government software are improved. Government software has strong personalized development requirements, and a set of codes cannot be completely universal. Through plug-in design, each functional module can be independently developed, deployed and updated, reducing the coupling between modules and enhancing the scalability and maintainability of the system; the application of hot deployment technology enables the system to be updated in real time without interrupting services, ensuring the continuity and stability of government services; it not only improves development efficiency and code reusability, but also significantly reduces downtime during deployment and updating, meeting the needs of modern government services for high availability, rapid response and personalized development, and improving user experience and service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] The present invention is further described below in conjunction with the accompanying drawings.
[0032] Figure 1 This is a flowchart of a method for developing and deploying plug-in government software based on Spring in Example 1;
[0033] Figure 2 This is a schematic diagram of the management interface in a Spring-based plug-in government software development and deployment method in Example 1. DETAILED DESCRIPTION
[0034] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0035] The embodiment of the present invention provides a Spring-based plug-in government software development and deployment method and system, which are used to solve the technical problem of how to improve the flexibility and high availability of government software.
[0036] Embodiment 1:
[0037] The present invention discloses a plug-in government affairs software development and deployment method based on Spring, which comprises six steps of plug-in creation and development, plug-in integration and debugging, plug-in packaging management, plug-in deployment, plug-in testing and plug-in publishing.
[0038] Step S100: Plug-in creation and development: Create a new version of the plug-in project to form a plug-in-type government software. Each plug-in project is an independent Spring Boot project, and plug-ins can communicate with each other through Feign.
[0039] When creating a new version of a plug-in project in step S100 of this embodiment, the required framework and functional modules, including MySQL, Elasticsearch, and Oracle, are integrated into the plug-in project.
[0040] As a specific implementation of step S100, the developer first creates a new plug-in project. Each plug-in project is an independent Spring Boot project, allowing developers to manage their own Maven dependencies separately. This can avoid dependency conflicts and ensure the independence and flexibility of the plug-in. Developers can integrate the required frameworks and functional modules in the plug-in project according to their needs, such as MySQL, Elasticsearch, Oracle, etc.
[0041] Feign is a declarative HTTP client framework powered by Spring Cloud. It simplifies the process of accessing remote services through RESTful APIs, making communication between services more concise and readable. Feign converts HTTP requests into Java method calls, allowing developers to call remote services like calling local methods, greatly improving development efficiency. At the same time, Feign supports load balancing, circuit breakers and other functions, making the microservice architecture more stable and flexible.
[0042] Step S200: plug-in integration debugging: installing the plug-in into the runner of the main container for integration testing and debugging. The runner of the main container provides management services for the plug-in.
[0043] As a specific implementation of step S200, after the initial functions are developed, the developer installs the plug-in into the main container Runner for integration testing and debugging. The main container Runner is the core of the entire system, which manages the loading and running of all plug-ins. Developers can debug the functions of the plug-in in the Runner environment to ensure its correctness and stability in the actual operating environment.
[0044] Step S300: Plug-in packaging management: After the plug-in is debugged normally in the runner of the main container, the plug-in is packaged into a plug-in package file in jar format. The plug-in package file contains all the code and dependencies of the plug-in, and the version number of the plug-in is marked on the plug-in package file.
[0045] As a specific implementation of step S300, when the plug-in is debugged normally in the Runner, the developer packages the plug-in into a JAR file. This JAR file contains all the code and dependencies of the plug-in. In order to facilitate version management and tracking, the developer needs to mark the plug-in package file with a clear version number. The management of the version number is helpful for subsequent upgrades, rollbacks and maintenance.
[0046] Step S400: Plug-in deployment: upload the plug-in package file to the runner of the formal environment. The runner of the formal environment provides management services for the plug-in. The plug-in is registered in nacos based on its address in the formal environment. Nacos monitors the connection status with the plug-in based on the heartbeat mechanism.
[0047] As a specific implementation of step S400, after packaging is completed, the plug-in JAR file will be uploaded to the Runner of the formal environment. The Runner of the formal environment is part of the production system and is responsible for the processing and operation of actual business. The process of uploading plug-ins requires strict permission control and review procedures to ensure the security and stability of the system.
[0048] Nacos is an open source distributed configuration and service discovery platform provided by Alibaba. It supports configuration management, service discovery and dynamic DNS services. Through Nacos, developers can easily implement centralized management and dynamic updates of configurations, while realizing registration and discovery of services under the microservice architecture, improving the elasticity and availability of the system.
[0049] Step S500: Plug-in test: load the new version of the plug-in in the formal environment by hot deployment, and test the plug-in to verify whether the function and performance of the plug-in meet expectations.
[0050] As a specific implementation of step S500, in the formal environment, the tester loads the new version of the plug-in through hot deployment. Hot deployment allows the plug-in to be dynamically loaded, unloaded, started, and stopped without restarting the main container, ensuring the continuous operation of the system. The tester conducts a comprehensive test of the new plug-in in the formal environment to verify whether its functions and performance meet expectations.
[0051] Step S600 Plug-in release: If the plug-in fails the test, the runner-based management service performs a rollback operation on the plug-in and rolls the plug-in back to the previous version. Correspondingly, nacos deregisters the local corresponding version of the plug-in. If the plug-in passes the test, the plug-in is released and put into use, and the corresponding plug-in creation and development, plug-in integration debugging, plug-in packaging management, plug-in deployment, plug-in testing, and plug-in release operation records are stored as operation logs.
[0052] In this embodiment, if a problem is found in the new version of the plug-in during the test, the tester can quickly roll back to the last stable version. This rollback mechanism is implemented through version management and Runner's plug-in management function. The rollback operation can be completed in a short time, reducing system downtime and ensuring business continuity and reliability.
[0053] After the test is passed and confirmed to be correct, the new version of the plug-in is officially released and put into use. The entire development, testing and deployment process is recorded in detail to ensure that the changes in each version are well documented, providing a reliable basis for subsequent maintenance and upgrades.
[0054] In this embodiment, when the plug-in communicates with the accessed plug-in as an access plug-in, the access plug-in calls nacos and searches for the address of the accessed plug-in from nacos. The access plug-in communicates with the accessed plug-in through Feign communication based on the searched address.
[0055] For the main container and the runner of the formal environment, the runner is a cloud application platform. The cloud platform interacts with the outside world through a visual management interface. The plug-in management interface is configured with a navigation bar. The navigation bar deploys the basic configuration service, cost management service, plug-in management service, and data management service of the plug-in. It is also configured with plug-in creation and plug-in selection buttons. The newly created plug-in is imported through the plug-in creation button, and the list is selected from the plug-in list through the selection button for operation.
[0056] The management interface displays the basic information of all plug-ins in the form of a plug-in list. The basic information includes plug-in code, plug-in name, plug-in type, latest version, normal / total number and operation, as well as the operation column. The plug-in code is the unique identifier of each plug-in, which is used to distinguish different plug-ins. The plug-in name is used to intuitively display the function and purpose of the plug-in. The plug-in type is used to indicate the classification of the plug-in or the functional module to which it belongs, which is convenient for management and search; the latest version is used to display the version number of the current plug-in. The normal / total number column is used to display the operation status of the plug-in instance. The green number indicates the number of normally running instances, and the gray number indicates the total number of instances. The operation column is used to manage and operate the function buttons for the plug-in. The function buttons include edit, upload and run.
[0057] The management interface of this implementation is designed to provide an intuitive and efficient plug-in management tool for developers and operation and maintenance personnel. The center of the interface displays a list of all plug-ins currently installed in the system, with each line representing an independent plug-in. The navigation bar on the left side of the interface contains modules such as basic configuration, cost management, plug-in management, and data management, ensuring that users can quickly switch to other management functions. In addition, there are "Create Plug-in" and "Select Plug-in" buttons in the upper right corner of the page, which are convenient for users to add new plug-ins or select existing plug-ins for operation. The entire interface design is concise and clear, with full functions, supporting dynamic management, version control, and troubleshooting of plug-ins, greatly improving the maintainability and scalability of the system.
[0058] The method of this embodiment is implemented by creating a custom ClassLoader, which inherits from java.lang.ClassLoader and overrides the findClass method to load new class bytecodes from the specified path and define classes. The system will regularly check for updates to the target class file. Once changes are found, the new class definition will be reloaded through the custom ClassLoader and the existing class instance will be replaced. In addition, combined with the Java reflection mechanism, the newly loaded class can be instantiated and method calls can be made to ensure that new functions take effect immediately. This method greatly improves the flexibility and maintainability of the system and is suitable for Java applications that need to be frequently updated or extended. Some of the principle codes are as follows:
[0059]
[0060]
[0061]
[0062] Code explanation: HotSwapClassLoader class:
[0063] Inherited from ClassLoader to implement custom loading and reloading of classes.
[0064] Use the findClass method to load the class bytecode from the file system and define the class.
[0065] The loadClassData method reads the byte data of a class file.
[0066] The reloadClass method removes and reloads the specified class from the cache.
[0067] Privacy protection and security enhancements:
[0068] Through plug-in development and independent module management, the system can perform refined permission control and data protection for different business modules. Each plug-in only processes specific business logic, reducing the risk of data leakage and ensuring the security of sensitive information.
[0069] The method of this embodiment has the following advantages:
[0070] (1) Enhanced usability and maintainability: Plug-ins can be dynamically loaded, unloaded, and updated without restarting the entire system, greatly simplifying system maintenance and upgrade operations. Hot deployment technology ensures continuous operation of the system, reduces downtime, and improves system availability.
[0071] (2) Flexibility and scalability: The plug-in development model makes the system highly flexible and scalable. Developers can quickly develop and deploy new business functions or update existing functions based on actual needs to meet the ever-changing needs of government affairs systems.
[0072] (3) Independent dependency management: Each plug-in can independently manage its own Maven dependencies, avoiding dependency conflicts and improving system stability and reliability. At the same time, this independent dependency management method also allows developers to more flexibly select and update third-party libraries.
[0073] (4) Module isolation and decoupling: Plug-ins are isolated from each other to ensure the independence and security of different business modules. The decoupling design between modules makes the system easier to maintain and expand. The failure or update of any plug-in will not affect the normal operation of other plug-ins.
[0074] (5) Multi-platform support: The system can run on multiple platforms, including domestic and trusted systems, ensuring the compatibility and security of the system, which is particularly suitable for application scenarios in the government industry.
[0075] (6) Support personalized needs: In the To-B system scenario, different clients have different needs. Plug-in development allows the expansion of specific functions without modifying the core code of the system. Different clients use different plug-ins, which solves the problem of developing extended functions for non-core systems.
[0076] (7) Flexible function implementation: In the To-C system scenario, the purpose of dynamically expanding system functions can be achieved by defining a Java interface in the main program and implementing different functions in the plug-in.
[0077] (8) Multi-version dependency management: Different plug-ins can use different versions of dependencies, solving the problem of dependency version conflicts. For example, the same program can connect to different versions of MySQL databases at the same time, ensuring system compatibility and stability.
[0078] (9) On-demand framework integration: Plug-ins can introduce different framework functions on demand, such as connecting to MySQL in plug-in A, connecting to Elasticsearch in plug-in B, and connecting to Oracle in plug-in C, to meet the needs of different business scenarios.
[0079] (10) Dynamic installation and uninstallation: Plug-ins can be dynamically installed, uninstalled, started, and stopped without restarting the main program, which improves the flexibility and continuity of the system.
[0080] Embodiment 2:
[0081] The present invention discloses a plug-in type government affairs software development and deployment system based on Spring, comprising a plug-in creation and development module, a plug-in integration and debugging module, a plug-in packaging management module, a plug-in deployment module, a plug-in testing module and a plug-in publishing module.
[0082] The plug-in creation development module is used to perform the following: create a new version of the plug-in project to form a plug-in-based government software. Each plug-in project is an independent Spring Boot project, and plug-ins can communicate with each other through Feign.
[0083] In this embodiment, when creating a new version of a plug-in project, the plug-in creation development module is used to integrate the required framework and functional modules, including MySQL, Elasticsearch, and Oracle, into the plug-in project.
[0084] Developers first create a new plugin project. Each plugin project is an independent SpringBoot project, allowing developers to manage their own Maven dependencies separately. This avoids dependency conflicts and ensures the independence and flexibility of the plugin. Developers can integrate the required frameworks and functional modules in the plugin project according to their needs, such as MySQL, Elasticsearch, Oracle, etc.
[0085] Feign is a declarative HTTP client framework powered by Spring Cloud. It simplifies the process of accessing remote services through RESTful APIs, making communication between services more concise and readable. Feign converts HTTP requests into Java method calls, allowing developers to call remote services like calling local methods, greatly improving development efficiency. At the same time, Feign supports load balancing, circuit breakers and other functions, making the microservice architecture more stable and flexible.
[0086] The plug-in integration debugging module is used to perform the following: installing the plug-in into the runner of the main container for integration testing and debugging, and the runner of the main container provides management services for the plug-in.
[0087] After developing the initial functions, developers install the plug-in into the main container Runner for integration testing and debugging. The main container Runner is the core of the entire system, which manages the loading and running of all plug-ins. Developers can debug the functions of the plug-in in the Runner environment to ensure its correctness and stability in the actual running environment.
[0088] The plug-in packaging management module is used to perform the following: After the plug-in is debugged normally in the runner of the main container, the plug-in is packaged into a plug-in packaging file in jar format. The plug-in packaging file contains all the code and dependencies of the plug-in, and the version number of the plug-in is marked on the plug-in packaging file.
[0089] After the plugin is debugged normally in the Runner, the developer packages the plugin into a JAR file. This JAR file contains all the code and dependencies of the plugin. To facilitate version management and tracking, the developer needs to mark the plugin package file with a clear version number. Version number management helps with subsequent upgrades, rollbacks, and maintenance.
[0090] The plug-in deployment module is used to perform the following: upload the plug-in package file to the runner of the formal environment, the runner of the formal environment provides management services for the plug-in, the plug-in is registered in nacos based on its address in the formal environment, and nacos monitors its connection status with the plug-in based on the heartbeat mechanism.
[0091] After packaging, the plug-in JAR file will be uploaded to the Runner of the formal environment. The Runner of the formal environment is part of the production system and is responsible for the processing and operation of actual business. The process of uploading plug-ins requires strict permission control and review procedures to ensure the security and stability of the system.
[0092] Nacos is an open source distributed configuration and service discovery platform provided by Alibaba. It supports configuration management, service discovery and dynamic DNS services. Through Nacos, developers can easily implement centralized management and dynamic updates of configurations, while realizing registration and discovery of services under the microservice architecture, improving the elasticity and availability of the system.
[0093] The plug-in test module is used to perform the following: load the new version of the plug-in through hot deployment in the formal environment, and test the plug-in to verify whether the function and performance of the plug-in meet expectations.
[0094] In the production environment, testers load the new version of the plug-in through hot deployment. Hot deployment allows plug-ins to be dynamically loaded, unloaded, started, and stopped without restarting the main container, ensuring the continuous operation of the system. Testers conduct comprehensive tests on new plug-ins in the production environment to verify whether their functions and performance meet expectations.
[0095] The plug-in release module is used to perform the following: If the plug-in fails the test, the runner-based management service performs a rollback operation on the plug-in and rolls the plug-in back to the previous version. Correspondingly, nacos deregisters the local corresponding version of the plug-in. If the plug-in passes the test, the plug-in is released and put into use, and the corresponding plug-in creation and development, plug-in integration debugging, plug-in packaging management, plug-in deployment, plug-in testing, and plug-in release operation records are stored as operation logs.
[0096] In this embodiment, if a problem is found in the new version of the plug-in during the test, the tester can quickly roll back to the last stable version. This rollback mechanism is implemented through version management and Runner's plug-in management function. The rollback operation can be completed in a short time, reducing system downtime and ensuring business continuity and reliability.
[0097] After the test is passed and confirmed to be correct, the new version of the plug-in is officially released and put into use. The entire development, testing and deployment process is recorded in detail to ensure that the changes in each version are well documented, providing a reliable basis for subsequent maintenance and upgrades.
[0098] The system of this embodiment can execute the method disclosed in Example 1 to realize the development and deployment of government software.
[0099] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A plug-in government software development and deployment method based on Spring, characterized in that: The steps include: Plug-in creation and development: Create a new version of the plug-in project to form a plug-in-based government software. Each plug-in project is an independent Spring Boot project, and plug-ins can communicate with each other through Feign. Plug-in integration debugging: Install the plug-in into the runner of the main container for integration testing and debugging. The runner of the main container provides management services for the plug-in. Plug-in packaging management: After the plug-in is debugged normally in the runner of the main container, the plug-in is packaged into a plug-in package file in jar format. The plug-in package file contains all the code and dependencies of the plug-in, and the version number of the plug-in is marked on the plug-in package file; Plug-in deployment: upload the plug-in package file to the runner of the formal environment. The runner of the formal environment provides management services for the plug-in. The plug-in is registered in nacos based on its address in the formal environment. Nacos monitors its connection status with the plug-in based on the heartbeat mechanism. Plugin testing: Load the new version of the plugin in the official environment through hot deployment, and test the plugin to verify whether the function and performance of the plugin meet expectations; Plug-in release: If the plug-in fails the test, the runner-based management service will roll back the plug-in to the previous version. Correspondingly, nacos will unregister the local corresponding version of the plug-in. If the plug-in passes the test, the plug-in will be released and put into use, and the corresponding plug-in creation and development, plug-in integration debugging, plug-in packaging management, plug-in deployment, plug-in testing, and plug-in release operation records will be stored as operation logs.
2. According to the spring-based and plug-in-based government affairs software development and deployment method of claim 1, it is characterized in that: When creating a new version of a plug-in project, integrate the required framework and functional modules into the plug-in project, including MySQL, Elasticsearch, and Oracle.
3. The method for developing and deploying government software based on Spring and plug-in according to claim 1 is characterized in that: After uploading the plug-in package file to the runner of the formal environment, the uploaded plug-in is subject to permission control and review. After passing the review, the plug-in is loaded through hot deployment.
4. The method for developing and deploying government software based on Spring and plug-in according to claim 1 is characterized in that: When a plug-in communicates with an accessed plug-in as an access plug-in, the access plug-in calls nacos and searches for the address of the accessed plug-in from nacos. The access plug-in communicates with the accessed plug-in through Feign communication based on the found address.
5. The method for developing and deploying government software based on Spring and plug-in type according to any one of claims 1 to 4, characterized in that: For the main container and the runner of the formal environment, the runner is a cloud application platform. The cloud platform interacts with the outside world through a visual management interface. The plug-in management interface is configured with a navigation bar. The navigation bar deploys the basic configuration service, cost management service, plug-in management service, and data management service of the plug-in. It is also configured with plug-in creation and plug-in selection buttons. The newly created plug-in is imported through the plug-in creation button, and the list is selected from the plug-in list through the selection button to perform operations; The management interface displays the basic information of all plug-ins in the form of a plug-in list. The basic information includes plug-in code, plug-in name, plug-in type, latest version, normal / total number and operation, as well as the operation column. The plug-in code is the unique identifier of each plug-in, which is used to distinguish different plug-ins. The plug-in name is used to intuitively display the function and purpose of the plug-in. The plug-in type is used to indicate the classification of the plug-in or the functional module to which it belongs, which is convenient for management and search; the latest version is used to display the version number of the current plug-in. The normal / total number column is used to display the operation status of the plug-in instance. The green number indicates the number of normally running instances, and the gray number indicates the total number of instances. The operation column is used to manage and operate the function buttons for the plug-in. The function buttons include edit, upload and run.
6. A plug-in government software development and deployment system based on Spring, characterized in that: Used to implement the development and deployment of government software through a Spring-based plug-in government software development and deployment method as described in any one of claims 1 to 5, the system includes a plug-in creation and development module, a plug-in integration and debugging module, a plug-in packaging management module, a plug-in deployment module, a plug-in testing module and a plug-in publishing module; The plugin creation development module is used to perform the following: create a new version of the plugin project to form a plugin-based government software. Each plugin project is an independent Spring Boot project, and plugins can communicate with each other through Feign. The plug-in integration debugging module is used to perform the following: install the plug-in into the runner of the main container for integration testing and debugging, and the runner of the main container provides management services for the plug-in; The plug-in packaging management module is used to perform the following: after the plug-in is debugged normally in the runner of the main container, the plug-in is packaged into a plug-in packaging file in jar format. The plug-in packaging file contains all the code and dependencies of the plug-in, and the version number of the plug-in is marked on the plug-in packaging file; The plugin deployment module is used to perform the following: upload the plugin package file to the runner of the formal environment, the runner of the formal environment provides management services for the plugin, the plugin is registered in nacos based on its address in the formal environment, and nacos monitors its connection status with the plugin based on the heartbeat mechanism; The plug-in test module is used to perform the following operations: load the new version of the plug-in through hot deployment in the official environment, and test the plug-in to verify whether the function and performance of the plug-in meet expectations; The plug-in release module is used to perform the following: If the plug-in fails the test, the runner-based management service performs a rollback operation on the plug-in and rolls the plug-in back to the previous version. Correspondingly, nacos deregisters the local corresponding version of the plug-in. If the plug-in passes the test, the plug-in is released and put into use, and the corresponding plug-in creation and development, plug-in integration debugging, plug-in packaging management, plug-in deployment, plug-in testing, and plug-in release operation records are stored as operation logs.
7. The plug-in-based government software development and deployment system based on Spring according to claim 6 is characterized in that: When creating a new version of a plug-in project, the plug-in creates a development module that is used to integrate the required framework and functional modules, including MySQL, Elasticsearch, and Oracle, into the plug-in project.
8. The plug-in-based government software development and deployment system based on Spring according to claim 6 is characterized in that: After uploading the plug-in package file to the runner of the formal environment, the plug-in package management module performs permission control and review on the uploaded plug-in. After passing the review, the plug-in deployment module is used to load the plug-in through hot deployment.
9. The plug-in government software development and deployment system based on Spring according to claim 6 is characterized in that: When a plug-in communicates with an accessed plug-in as an access plug-in, the access plug-in calls nacos and searches for the address of the accessed plug-in from nacos. The access plug-in communicates with the accessed plug-in through Feign communication based on the found address.
10. The plug-in-based government software development and deployment system based on Spring according to any one of claims 6 to 9, characterized in that: For the main container and the runner of the formal environment, the runner is a cloud application platform. The cloud platform interacts with the outside world through a visual management interface. The plug-in management interface is configured with a navigation bar. The navigation bar deploys the basic configuration service, cost management service, plug-in management service, and data management service of the plug-in. It is also configured with plug-in creation and plug-in selection buttons. The newly created plug-in is imported through the plug-in creation button, and the list is selected from the plug-in list through the selection button to perform operations; The management interface displays the basic information of all plug-ins in the form of a plug-in list. The basic information includes plug-in code, plug-in name, plug-in type, latest version, normal / total number and operation, as well as the operation column. The plug-in code is the unique identifier of each plug-in, which is used to distinguish different plug-ins. The plug-in name is used to intuitively display the function and purpose of the plug-in. The plug-in type is used to indicate the classification of the plug-in or the functional module to which it belongs, which is convenient for management and search; the latest version is used to display the version number of the current plug-in. The normal / total number column is used to display the operation status of the plug-in instance. The green number indicates the number of normally running instances, and the gray number indicates the total number of instances. The operation column is used to manage and operate the function buttons for the plug-in. The function buttons include edit, upload and run.
Citation Information
Cited By
Code-free online plug-in development and release method and system, computer equipment and computer readable storage medium
CN121300752A