SaaS product localization aggregation deployment method and device, medium and product
Through aggregating deployment of multiple SaaS products, dealing with conflict problems and refined packaging, it solves the problem of excessive resources in the localized deployment, and realizes the efficient utilization of resources and the stability and maintenance of the system.
Patent Information
- Application Number
- CN202411463568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-21
AI Technical Summary
When locally deploying SaaS products, if the module is continued to be split, it will lead to excessive resource utilization and unnecessary waste.
By aggregating and deploying multiple local SaaS products, we handle request path conflicts, configuration conflicts, and Bean name conflicts. We use prefixes, preset annotations, and unique Bean names to resolve conflicts, and use the Maven build tool for refined packaging.
It reduces the occupation of resources, avoids unnecessary waste, improves the stability and maintainability of the system, adapts to the needs of different regions and cultures, and enhances the market competitiveness of the product.
Smart Images

Figure CN119336340A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of localized deployment technology, and in particular to a method, device, medium and product for localized aggregation deployment of SaaS products. Background Art
[0002] SaaS products are usually divided into multiple small modules according to their functional characteristics to achieve independent deployment and flexible expansion. However, if this split state is maintained during local deployment, it will lead to excessive occupation of resources and unnecessary waste. Summary of the invention
[0003] The purpose of this application is to provide a SaaS product localized aggregation deployment method, equipment, medium and product, which can reduce resource usage and avoid unnecessary waste.
[0004] To achieve the above objectives, this application provides the following solutions:
[0005] In a first aspect, the present application provides a method for localized aggregation deployment of SaaS products, including:
[0006] Aggregate and deploy several local SaaS products;
[0007] When a request path conflict occurs among several SaaS products deployed in an aggregated manner, a prefix is added to the request path of the SaaS product with the request path conflict.
[0008] When conflicts occur between the configurations of several SaaS products deployed in an aggregated manner, the configurations of the SaaS products with the conflicts are extracted into a configuration module, and preset annotations are added to the configurations;
[0009] When a bean name conflict occurs among several SaaS products deployed in an aggregated manner, a preset bean name is set for the SaaS product with the bean name conflict.
[0010] Optionally,
[0011] The prefix is determined according to the package name.
[0012] Optionally,
[0013] The preset annotation is @ConditionalOnProperty.
[0014] Optionally, when a Bean name conflict occurs among several SaaS products deployed in an aggregated manner, setting a preset Bean name for the SaaS product with the Bean name conflict specifically includes:
[0015] When a bean name conflict occurs among several SaaS products deployed in an aggregated manner, the bean names of the SaaS products with the bean name conflict shall be set separately.
[0016] Optionally, when a Bean name conflict occurs among several SaaS products deployed in an aggregated manner, after setting a preset Bean name for the SaaS product with the Bean name conflict, the method further includes:
[0017] Package each SaaS product to generate a common package.
[0018] Optionally, after packaging the SaaS products to generate a common package, the process further includes:
[0019] An aggregate project is created, wherein the aggregate project includes the common packages; a prefix is added before a request corresponding to each common package.
[0020] Optionally, packaging each SaaS product to generate a common package specifically includes:
[0021] Use Maven build tools to package various SaaS products and generate common packages.
[0022] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for localized aggregation deployment of SaaS products.
[0023] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for localized aggregation deployment of SaaS products.
[0024] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned SaaS product localization aggregation deployment methods.
[0025] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0026] The present application provides a method, device, medium and product for localized aggregate deployment of SaaS products, the method comprising: aggregate deployment of several local SaaS products; when request path conflicts occur among several SaaS products deployed in aggregate, prefix the request path of the SaaS product with the request path conflict; when configuration conflicts occur among several SaaS products deployed in aggregate, extract the configuration of the SaaS product with the configuration conflict into a configuration module, and add preset annotations to the configuration; when Bean name conflicts occur among several SaaS products deployed in aggregate, set a preset Bean name for the SaaS product with the Bean name conflict. The present application combines multiple related modules through aggregation technology to form a unified deployment unit. Doing so can not only reduce resource usage, but also improve system stability and maintainability. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A flowchart of a method for localized aggregation deployment of SaaS products provided in one embodiment of the present application;
[0029] Figure 2 A schematic diagram of using different prefixes for different packets provided in an embodiment of the present application;
[0030] Figure 3 A schematic diagram of configuring dynamic activation in Configuration provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of dynamically activating configuration in application.yaml provided in an embodiment of the present application;
[0032] Figure 5 A schematic diagram of an error caused by a conflict of the same beanname in a project provided in an embodiment of the present application;
[0033] Figure 6 A schematic diagram of customizing beannames to resolve beanname conflicts is provided in an embodiment of the present application;
[0034] Figure 7 A schematic diagram of a rich packet and a normal packet solution provided in an embodiment of the present application;
[0035] Figure 8 A schematic diagram of aggregating multiple product modules provided in one embodiment of the present application;
[0036] Fig. 9 A schematic diagram of SaaS requests with different prefixes being transferred to different products provided in an embodiment of the present application;
[0037] Fig.10 A schematic diagram of localizing different prefix flows to aggregated products provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] This application proposes a localized aggregate deployment solution for SaaS products based on the Spring Boot framework, which aims to effectively reduce deployment costs by centralized management and optimized resource allocation, while ensuring the stability and maintainability of the system. Through localized aggregate deployment, SaaS products can more flexibly adapt to the needs of different regions and cultures, improve market adaptability, and further enhance the market competitiveness of products.
[0040] In an exemplary embodiment, Figure 1 As shown, a method for localized aggregation deployment of SaaS products is provided, and the specific steps include:
[0041] S1. Aggregate and deploy several local SaaS products. When deploying in aggregate, different products are placed in different packages and named in a standardized manner. The aggregate deployment in this embodiment can be understood as placing the modules you want to aggregate on a dependency, using a directory, putting the required things in this directory, and then loading them when you load them. This is called dependency.
[0042] S2. When a request path conflict occurs among several SaaS products deployed in an aggregated manner, a prefix is added to the request path of the SaaS product with the request path conflict.
[0043] This example is based on a slight modification of the Spring Boot project to achieve localized aggregation deployment of SaaS products. First, you need to standardize the product package name:
[0044] For different products, you need to specify their package names and ensure the uniqueness of their access paths. This helps to add appropriate prefixes to different product requests based on the package names during aggregate deployment.
[0045] For example, the package names of basic-set and basic-login products are both com.sobot.basic, and the two products cannot be distinguished. Their packages need to be further split. The package name of basic-set is com.sobot.basic.set, and the package name of basic-login is com.sobot.basic.login. When aggregating, you only need to add the prefix basic-set to the controller of the basic-set product, and add the prefix basic-login to the basic-login product. After this step, the request path can be kept unchanged. There is no conflict in the request path. For details, please refer to Figure 2 .
[0046] S3. When conflicts occur between the configurations of several SaaS products deployed in aggregate, the configurations of the SaaS products with the conflicts are extracted into a configuration module, and a preset annotation is added to the configurations. The preset annotation is @ConditionalOnProperty.
[0047] Each product has its own independent configuration file. When multiple products are aggregated as modules, there may be conflicts between the configurations. Extract the product configuration into a configuration module and add the annotation @ConditionalOnProperty to the configuration. For details, see Figure 3 Adding an activation configuration to the configuration file of the product to be activated can solve the configuration conflict problem. For details, see Figure 4 .
[0048] S4. When a bean name conflict occurs among several SaaS products deployed in an aggregated manner, a preset bean name is set for the SaaS product with the bean name conflict.
[0049] In this embodiment, when a Bean name conflict occurs among several SaaS products deployed in an aggregated manner, the Bean names of the SaaS products with the Bean name conflict are set separately.
[0050] Specifically: Bean conflict handling: In multiple products, beans with the same name (such as UserController) may appear. To avoid conflicts, you can set unique names for these beans (beanName to ensure the uniqueness of the beans. For example: two products have UserController and they both have a simple annotation @Controller. When they instantiate the beans in spring, the beanname is userController. There is no problem when they are deployed independently. When they are deployed in an aggregated manner, an error will be reported when starting. For details, please refer to Figure 5 When local aggregation is performed, the conflicting @Controller will be found to add beanname to avoid conflicts. For details, please refer to Figure 6 This change has no impact on standalone deployments and can be fed back to SaaS.
[0051] In addition, when a bean name conflict occurs among several SaaS products deployed in an aggregated manner, after setting a preset bean name for the SaaS product with the bean name conflict, the method further includes:
[0052] Use Maven build tools to package various SaaS products and generate common packages.
[0053] In this embodiment, the product supports printing small packages: using Spring Boot's Maven plugin (spring-boot-maven-plugin) can generate a rich package containing all dependencies. However, in order to meet the needs of localized aggregate deployment, it is sometimes necessary to print smaller packages that only contain necessary code. This can be achieved by adjusting Maven's configuration profile. We add the spring-boot-maven-plugin plug-in for each product to the profile. It is activated by default. When packaging locally, you can print a normal package by not activating the plug-in [mvn install-Pops activates ops to make the plug-in invalid], which can be used as a module aggregation for aggregated products. For details, please refer to Figure 7 .
[0054] After packaging the various SaaS products to generate a common package, the method further includes: creating an aggregate project, wherein the aggregate project includes the common package; and adding a prefix before each request corresponding to the common package.
[0055] In this example, localization creates an aggregate project: Create an aggregate project that will depend on multiple product packages. For each package, add an appropriate prefix based on its package name to ensure that it can be correctly identified and loaded in the aggregate project. For details, see Figure 2 .
[0056] Through the above steps, localized and aggregated deployment of SaaS products can be achieved, thus providing strong support for the rapid expansion of enterprises around the world. For details, please refer to Figure 8 .
[0057] The localized aggregation deployment solution of SaaS products is particularly important in today's increasingly globalized market environment. This embodiment not only brings many conveniences to the operation and maintenance of SaaS projects, but also provides strong support for the rapid expansion of enterprises in multi-regional and multi-language environments.
[0058] Fine-tuning convenience:
[0059] When an existing SaaS project needs to be fine-tuned, this solution allows small-scale, targeted adjustments to be made while maintaining system stability. This greatly reduces the complexity of system upgrades or modifications, while also reducing possible risks.
[0060] Reduce transformation workload:
[0061] For localized projects, this solution uses a series of carefully designed mechanisms, such as package name specifications and configuration independence, so that in most cases, there is no need for large-scale additional modifications to the original SaaS code. This not only saves development resources, but also improves the overall efficiency of the project.
[0062] Subsequent upgrade friendliness:
[0063] This solution fully considers the subsequent upgrade requirements of the localization project. Through reasonable architecture design and modular deployment, it ensures that the localization project can easily complete the smooth transition from the old version to the new version when facing a new version upgrade.
[0064] In an exemplary embodiment, a method for localized aggregation deployment of SaaS products is provided, and the specific steps include:
[0065] Step 1: Clearly distinguish different product components through standardized package structure to ensure the standardization and maintainability of the project structure.
[0066] Step 2: Introduce a unified configuration management mechanism to effectively avoid configuration conflicts between different product components and improve the stability and reliability of deployment.
[0067] Step 3: Prevent and resolve beanName conflicts by setting a unique beanName or namespace to ensure the uniqueness and correctness of beans in the Spring container.
[0068] Step 4: Use Maven build tools for refined packaging to generate small and efficient common packages to facilitate subsequent aggregate deployment.
[0069] Step 5: Aggregate and deploy various product components to achieve centralized management and efficient use of resources, ensuring the stable operation of the entire SaaS product in different environments.
[0070] The aggregate deployment in this embodiment is to add dependencies to the modules you want to aggregate. Dependencies are included when packaging. Figure 8 As shown in the code.
[0071] The aggregate deployment in this embodiment can be understood as Fig. 9 and Fig.10 ,in, Fig. 9 The SaaS model is used, where basic-set and basic-login are deployed separately, and each module is a service. Fig.10 The whole is one service, which is equivalent to two services before and now it is one service.
[0072] The effects of this embodiment are:
[0073] SaaS:
[0074] When there is a basic-login / login request, nginx routes it to the basic-login product based on the prefix basic-login and calls the login request for that product.
[0075] There is a basic-set / login request. Nginx routes it to the basic-set product based on the prefix basic-set. To call the login request for this product, see Fig. 9 .
[0076] Localization:
[0077] There is a basic-login / login request, and nginx routes it to the basic-wrapper product based on the prefix basic-login. Based on the prefix basic-login and login, it can be determined that the request is a login request in the basic-login module.
[0078] There is a basic-set / login request. Nginx routes it to the basic-wrapper product based on the prefix basic-set. Based on the prefix basic-set and login, it can be determined that the request is a login request in the basic-set module. For details, see Fig.10 .
[0079] In an exemplary embodiment, a method for localized aggregation deployment of SaaS products is provided, and the specific steps include:
[0080] Step 1: Through the standardized package structure, add independent routes for different products so that the aggregation module can support multiple routing mechanisms to ensure the independence and scalability of the products.
[0081] Step 2: Use a unified configuration management mechanism to resolve configuration conflicts between different products and ensure the stability and reliability of system deployment.
[0082] Step 3: To solve the problem of duplicate class names, set a unique beanName or namespace to effectively prevent and resolve beanName conflicts.
[0083] Step 4: Use Maven to build tools to fine-tune the packaging of each product module and generate small common packages for subsequent aggregate deployment.
[0084] Step 5: Create a dedicated aggregation module to aggregate multiple product modules to achieve centralized management and efficient use of resources.
[0085] Compared with the traditional SaaS project localization deployment solution, this solution has the following advantages:
[0086] Traditional solutions usually adopt the same method as SaaS deployment, resulting in local deployment taking up a lot of resources and placing a burden on customers with smaller business volumes. However, this solution significantly reduces resource consumption by optimizing aggregate deployment.
[0087] Traditional solutions may require manual aggregation of multiple projects and extensive testing. This solution simplifies the aggregation process and reduces testing costs through standardized package structure and configuration management.
[0088] This solution is more convenient in terms of later functional synchronization, and can easily synchronize the functions of SaaS products to localized deployment, reducing maintenance workload.
[0089] The localized aggregation deployment solution for SaaS products based on Spring Boot effectively solves the problems existing in traditional localized deployment solutions by optimizing aggregation strategies and configuration management, improves deployment efficiency and system stability, and reduces maintenance costs.
[0090] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0091] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0092] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0093] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0094] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0095] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0096] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0097] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for localized aggregation deployment of SaaS products, characterized in that: The SaaS product localized aggregation deployment method includes: Aggregate and deploy several local SaaS products; When a request path conflict occurs among several SaaS products deployed in an aggregated manner, a prefix is added to the request path of the SaaS product with the request path conflict. When conflicts occur between the configurations of several SaaS products deployed in an aggregated manner, the configurations of the SaaS products with the conflicts are extracted into a configuration module, and preset annotations are added to the configurations; When a bean name conflict occurs among several SaaS products deployed in an aggregated manner, a preset bean name is set for the SaaS product with the bean name conflict.
2. The SaaS product localization aggregation deployment method according to claim 1 is characterized in that: The prefix is determined according to the package name.
3. The SaaS product localization aggregation deployment method according to claim 1, characterized in that: The preset annotation is @ConditionalOnProperty.
4. The method for localized aggregation deployment of SaaS products according to claim 1, characterized in that: When a bean name conflict occurs among several SaaS products deployed in an aggregated manner, a preset bean name is set for the SaaS product with the bean name conflict, specifically including: When a bean name conflict occurs among several SaaS products deployed in an aggregated manner, the bean names of the SaaS products with the bean name conflict shall be set separately.
5. The method for localized aggregation deployment of SaaS products according to claim 1, characterized in that: After setting a preset Bean name for the SaaS product with the Bean name conflict when a Bean name conflict occurs among the plurality of SaaS products deployed in an aggregated manner, the method further includes: Package each SaaS product to generate a common package.
6. The method for localized aggregation deployment of SaaS products according to claim 5, characterized in that: After packaging each SaaS product to generate a common package, it also includes: An aggregate project is created, wherein the aggregate project includes the common packages; a prefix is added before a request corresponding to each common package.
7. The method for localized aggregation deployment of SaaS products according to claim 5, characterized in that: The packaging of various SaaS products to generate a common package specifically includes: Use Maven build tools to package various SaaS products and generate common packages.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the SaaS product localization aggregation deployment method described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the SaaS product localization aggregation deployment method described in any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the SaaS product localization aggregation deployment method described in any one of claims 1 to 7 is implemented.