Adaptation method and system for docking SpringBoot framework with IAM platform, terminal and medium

By upgrading the SpringMVC framework to the SpringBoot framework and directly connecting to the IAM platform, the problem of IAM system failure after the replacement of Tomcat with the domestic IT middleware was solved, and the stable operation of the identity authentication function and the improvement of system performance were achieved.

CN120929128APending Publication Date: 2025-11-11SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510868072.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

During the upgrade from SpringMVC to SpringBoot, the problem of IAM system failure after the replacement of Tomcat application server with the domestically developed middleware was mainly due to the missing Tomcat package that IAM depends on, which caused the authentication function to fail.

Method used

Migrate the business logic and front-end code from the SpringMVC framework to the SpringBoot framework, and add a new WebConfig configuration class in the SpringBoot framework to replace the traditional web.xml configuration. Directly connect to the IAM platform, compile with Maven and replace the Tomcat application server, and configure the SpringBoot framework to access the front-end JSP interface.

Benefits of technology

The system resolved compatibility issues with the IAM system, ensuring stable operation of the identity authentication function, reducing dependencies on intermediate components, lowering system deployment complexity and resource consumption, and improving overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929128A_ABST
    Figure CN120929128A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of micro-services, and particularly discloses an adaptation method and system for a SpringBoot framework to be in butt joint with an IAM platform, a terminal and a medium, and the method comprises the steps: migrating a service code and a front-end code of a SpringMVC framework to the SpringBoot framework which is in butt joint with the IAM platform; parameters in the original configuration file of the SpringMVC framework are copied to the configuration file of the SpringBoot framework; after compiling of all the service codes is completed and no error occurs, the original default Tomcat is replaced with credential middleware; the method comprises the following steps of: newly adding a WebConfig configuration class in a SpringBoot framework; and configuring a front end jsp interface access mode of the SpringBoot framework. According to the method, the problem that the docking IAM is incompatible in the adaptation process of the credential middleware is solved, so that the deployment weight of the data management platform is reduced, and the deployment cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microservice technology, specifically to an adaptation method, system, terminal, and medium for the Spring Boot framework to the IAM platform. Background Technology

[0002] Currently, the ever-increasing volume of data demands high-performance storage and transmission technologies, while complex business requirements necessitate high-performance service architectures. Therefore, upgrading and transforming existing business systems is essential. During system upgrades, compatibility issues with new technologies often trouble developers. For example, during the technical update of a data governance platform based on the SpringMVC framework, while simultaneously adapting a domestically developed middleware to replace the Tomcat application server, incompatibility issues arose between the domestically developed middleware and the existing Unified Identity Authentication (IAM) system. This was primarily because the replacement of the Tomcat application server with the domestically developed middleware resulted in the loss of Tomcat packages that IAM depends on. This rendered the keycloak component of the original IAM system, which depends on Tomcat, unusable, causing the IAM system of the data governance platform to malfunction. Summary of the Invention

[0003] To address the aforementioned issues, this invention provides a method, system, terminal, and medium for adapting the Spring Boot framework to the IAM platform. It transforms and upgrades business projects based on the Spring MVC framework to the Spring Boot framework, thereby adapting to domestic IT middleware, replacing the Tomcat network service tool, and supporting domestic IT products. Simultaneously, it resolves the incompatibility issues when adapting to domestic IT middleware and integrating with IAM, thereby reducing the weight of the data governance platform deployment and lowering deployment costs.

[0004] In a first aspect, the technical solution of the present invention provides a method for adapting the Spring Boot framework to the IAM platform, comprising the following steps: Integrate the Spring Boot framework with the IAM platform; The original business logic and front-end code of the SpringMVC framework were migrated to the SpringBoot framework, which is now integrated with the IAM platform. Copy the parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file; Test whether the migrated business code compiles successfully. After all business code has been compiled without errors, replace the original default Tomcat application server with the domestically developed middleware. Adding a WebConfig configuration class to the Spring Boot framework indicates that the WebConfig configuration class is for web-related configurations and that the WebConfig configuration class implements the WebMvcConfigurer interface; Configure the way to access the front-end JSP interface in the Spring Boot framework, including using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

[0005] In an optional implementation, the business logic and front-end code of the original SpringMVC framework are migrated to the SpringBoot framework, which is integrated with the IAM platform. Specifically, this includes: While keeping the path unchanged, migrate the business code of the original SpringMVC framework project to the SpringBoot framework project; Migrate the front-end code of the SpringMVC framework to the SpringBoot framework project; Add a project startup class to the Spring Boot framework project code. The path should be placed in the same directory as the business code.

[0006] In an optional implementation, the parameters in the original Spring MVC framework configuration file are copied to the Spring Boot framework configuration file, specifically including: Copy the parameters from the configuration file in the SpringMVC project to the configuration file under the resources package in the SpringBoot project; if the relevant configuration file does not exist, recreate the configuration file and then copy the parameters.

[0007] In one optional implementation, the compilation of the migrated business code is tested. After all business code has been compiled without errors, the original default Tomcat application server is replaced with a domestically developed middleware, specifically including: In the IDEA tool, the Spring Boot project is compiled using Maven, and errors that occur during the compilation process are resolved, including adding dependencies required for business code and forgetting configuration parameters; After all business code has been compiled without errors, add the build configuration of the domestic IT middleware to the pom.xml file to replace the original default Tomcat application server; To verify if the domestic IT middleware is effective after compilation using Maven, if no compilation errors occur, then verify that the Spring Boot framework application is started using the domestic IT middleware.

[0008] In an optional implementation, a new WebConfig configuration class is added to the Spring Boot framework, specifically including: For the context path accessed by the project, override the configurePathMatch method and add a prefix to the access path using the addPathPrefix() method in the configurePathMatch method; For the ViewResolver in the front-end JSP interface, the ViewResolver object is injected using the @Bean annotation, a resolver prefix is ​​added using setPrefix(), and a resolver suffix is ​​added using setSuffix(). For filters and interceptors, inject FilterRegistrationBean<“Filter to be injected”> using the @Bean annotation to make it effective, set the URL pattern of the filter using the addUrlPatterns() method, set the priority using the setOrder() method, and set the filter's initialization parameters using the addInitParameter() method.

[0009] In an optional implementation, when configuring the Spring Boot framework to access the front-end JSP interface, the Controller class is annotated with @Controller, the Controller interface cannot use the @ResponseBody annotation, and the returned string is the filename of the JSP file, so that the path concatenated with the filename and the view resolver prefix and suffix configured in WebConfig is the relative path of the JSP file under the webapp package.

[0010] In an optional implementation, the method further includes the following steps: After completing the Controller interface, test whether the IAM platform connected to the Spring Boot framework is effective. If you can log in using the original IAM platform account information, it means that the connected IAM platform is effective. If the connected IAM platform is not effective, add a new WebConfig configuration class in the Spring Boot framework. After successfully logging into the IAM platform, configure the user ID and authentication token in the browser's Cookie and Session respectively; Based on the user ID and permission authentication token, test whether each function in the business system is working properly.

[0011] Secondly, the technical solution of the present invention provides an adaptation system for the Spring Boot framework to interface with the IAM platform, comprising: The framework platform integration module is used to integrate the Spring Boot framework with the IAM platform; The code migration module is used to migrate the original business code and front-end code of the SpringMVC framework to the SpringBoot framework that has been integrated with the IAM platform. The configuration file parameter copy module is used to copy parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file. The code compilation test module is used to test whether the migrated business code compiles successfully. After all business code has been compiled without errors, the original default Tomcat application server is replaced with the domestic IT innovation middleware. A new WebConfig configuration class module has been added. This module is used to add WebConfig configuration classes in the Spring Boot framework. It indicates that the WebConfig configuration class is for web-related configurations and implements the WebMvcConfigurer interface. The module for configuring the access method to the front-end JSP interface is used to configure the access method to the front-end JSP interface in the Spring Boot framework. This includes using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

[0012] Thirdly, the technical solution of the present invention provides a terminal, comprising: The storage is used to store the Spring Boot framework's adapter program for connecting to the IAM platform; The processor is configured to implement the steps of the Spring Boot framework IAM platform adaptation method as described above when executing the Spring Boot framework IAM platform adaptation program.

[0013] Fourthly, the present invention provides a computer-readable storage medium storing an adapter program for the Spring Boot framework to interface with the IAM platform. When the Spring Boot framework to interface with the IAM platform adapter program is executed by a processor, it implements the steps of the Spring Boot framework to interface with the IAM platform adapter method as described in any of the above claims.

[0014] As can be seen from the above technical solutions, this application has the following advantages: 1. By upgrading the SpringMVC framework to the SpringBoot framework and directly integrating the SpringBoot framework with the IAM platform, dependency conflicts caused by replacing Tomcat with a domestically developed middleware were avoided. The issue of the original IAM system being unable to use the Keycloak component due to its dependency on Tomcat was completely resolved, ensuring stable operation of the identity authentication function.

[0015] 2. The redundant solution of indirectly connecting to IAM through Keycloak has been abandoned. Instead, Spring Boot directly connects to the IAM system, reducing the dependency on the intermediate component (Keycloak), significantly reducing the deployment complexity and resource consumption of the system, and improving overall performance.

[0016] 3. By smoothly migrating SpringMVC's business logic, front-end code, and configuration files to the Spring Boot framework and adapting it to the domestically developed middleware, the original business logic is ensured to remain unaffected. The newly added WebConfig configuration class replaces the traditional web.xml, offering stronger compatibility and supporting flexible path configuration and view resolution.

[0017] 4. Spring Boot's convention-over-configuration principle simplifies dependency management and deployment processes, while the adaptation of domestic IT middleware further meets the requirements of domestic IT innovation. Through migration steps such as configuration file conversion, compilation testing, and middleware replacement, the difficulty and risk of technology upgrades are reduced. Attached Figure Description

[0018] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram illustrating a Spring Boot framework adaptation method for connecting to the IAM platform, provided in an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram illustrating another method for adapting the Spring Boot framework to the IAM platform, provided in an embodiment of the present invention.

[0021] Figure 3 This is a schematic block diagram of an adaptation system structure for the Spring Boot framework to the IAM platform, provided as an embodiment of the present invention.

[0022] Figure 4 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0023] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0025] Figure 1 This is a schematic diagram illustrating a method for adapting the Spring Boot framework to the IAM platform, as provided in an embodiment of the present invention. Figure 1 The executing entity can be an adaptation system for the Spring Boot framework to the IAM platform. The Spring Boot framework to IAM platform adaptation method provided in this embodiment is executed by a computer device, and correspondingly, the Spring Boot framework to IAM platform adaptation system runs on the computer device. Depending on different requirements, the order of steps in this flowchart can be changed, and some steps can be omitted.

[0026] like Figure 1 As shown, the method includes the following steps.

[0027] S1 connects the Spring Boot framework with the IAM platform.

[0028] To adapt to the domestic IT innovation middleware, a direct connection must first be established between the Spring Boot framework and the IAM platform to avoid dependency conflicts caused by middleware components. Specifically, the required dependency packages of the IAM system are included in the pom.xml file of the Spring Boot project. By configuring the dependency relationships, the initial connection between the framework and the IAM platform is completed, laying the foundation for subsequent business migration.

[0029] S2 migrates the original business logic and front-end code from the SpringMVC framework to the SpringBoot framework, which is integrated with the IAM platform.

[0030] This step migrates the business logic and front-end presentation layer of the old framework (SpringMVC) to the new SpringBoot framework, ensuring the continuity of business functions.

[0031] S3 copies the parameters from the original SpringMVC framework's configuration file to the SpringBoot framework's configuration file.

[0032] This step migrates configuration parameters to maintain the operating environment of the business system, such as database connections and cache configurations.

[0033] S4. Test whether the migrated business code compiles successfully. After all business code has been compiled without errors, replace the original default Tomcat application server with the domestically developed middleware.

[0034] This step verifies the correctness of the code migration and replaces it with a domestic IT innovation middleware to support the needs of domestic IT innovation.

[0035] S5. Add a WebConfig configuration class to the Spring Boot framework. This indicates that the WebConfig configuration class is for web-related configurations and implements the WebMvcConfigurer interface.

[0036] This step replaces the configuration functionality of web.xml in SpringMVC, enabling the configuration of web-related components such as Servlets, filters, and interceptors.

[0037] S6 configures the way to access the front-end JSP interface in the Spring Boot framework, including using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

[0038] This step resolves the access issue for JSP interfaces under the Spring Boot framework, replacing the initialization redirection configuration in web.xml of Spring MVC.

[0039] Furthermore, as a refinement and extension of the specific implementation methods described above, and to fully illustrate the specific implementation process in this embodiment, another method for adapting the Spring Boot framework to the IAM platform is provided. Figure 2The flowchart illustrates the process: First, migrate the business logic code of the SpringMVC project, replacing the business logic code of the SpringBoot project that has already integrated IAM, and copy the front-end code to the same directory of the SpringBoot project. Second, based on the business logic code, modify or add configuration files in the SpringBoot project, and import the dependency packages required by the IAM system and the domestic IT middleware, configuring the project build method; add a WebConfig configuration class to replace the servlet configuration in web.xml in SpringMVC; then compile the SpringBoot project using Maven, checking for bugs in the migrated business logic code; finally, modify the way the SpringBoot project accesses the front-end interface, providing an interface to access the front-end JSP interface. When the application starts, the IAM login interface should be displayed in the browser and login should be successful, indicating that the configuration is complete. Specifically, the process includes the following steps.

[0040] S101, Spring Boot framework project integrates with the IAM platform.

[0041] This step involves integrating the Spring Boot framework with the IAM platform. On one hand, this upgrades the Spring MVC framework modules of the data governance platform to the Spring Boot framework. On the other hand, the adaptation requirements for the domestic IT middleware necessitate that the project system be based on the Spring Boot framework. Therefore, before officially migrating the business code, the Spring Boot project is built by including the IAM dependency package in pom.xml to complete the IAM integration.

[0042] During the adaptation of an existing Spring-based project to a domestically developed middleware, the replacement of the Tomcat tool rendered the Keycloak component of the original IAM system unusable, causing the IAM system of the data governance platform to malfunction. The original method of connecting the data governance platform to IAM used Keycloak as a bridge, first connecting to Keycloak and then using Keycloak to connect to IAM. However, IAM also integrates Keycloak, meaning that the bridge Keycloak only served a connecting function and did not contribute to authentication or authorization. Therefore, this Keycloak component can be removed, and the business platform can directly connect to the IAM system, thereby reducing the overall weight of the governance platform.

[0043] S102, Migrate business code and front-end code This step involves migrating the original SpringMVC framework's business logic and front-end code to the SpringBoot framework, which is now integrated with the IAM platform. The specific steps include:

[0044] S1021, while keeping the path unchanged, migrate the business code of the original SpringMVC framework project to the SpringBoot framework project.

[0045] When migrating business logic code from an existing Spring MVC project to a Spring Boot project, it is necessary to ensure that the path of the migrated business logic code remains unchanged. If the path does not exist in the Spring Boot project, it needs to be created manually.

[0046] S1022, migrate the front-end code of the SpringMVC framework to the SpringBoot framework project.

[0047] For example, migrate the front-end code package webapp to the src / main directory. That is, when migrating the front-end code, you need to move the entire webapp folder (which usually contains JSP, static resources and other front-end files) from the original SpringMVC project to the src / main directory of the SpringBoot project to maintain path consistency.

[0048] S1023. Add a project startup class to the Spring Boot framework project code. The path needs to be placed in the same directory as the business code.

[0049] S103, modification of configuration files and parameters.

[0050] This step copies the parameters from the original Spring MVC framework's configuration file to the Spring Boot framework's configuration file. Specifically, it copies the parameters from the Spring MVC project's configuration file to the configuration files under the resources package of the Spring Boot project. This includes database connection information, Redis-related configuration files, and configuration information required for IAM integration. Note the format conversion of the configuration files, distinguishing between .properties and .yml files. If the relevant configuration files do not exist, create them manually.

[0051] Spring Boot supports two main configuration file formats: .properties and .yml. They offer the same functionality but differ significantly in syntax; therefore, it's important to distinguish between the .properties and .yml file formats. If the original file is XML or .properties, it can be converted to .yml to simplify configuration.

[0052] During the migration process, the relevant configuration files mainly refer to the configuration files used to store system parameters in the original SpringMVC project, including core configuration classes, framework configuration classes, environment-related configurations, etc. For example, the placeholder ${jdbc.url} must be ensured to exist in the corresponding configuration source (such as environment variables) in Spring Boot.

[0053] S104, Test whether the code compiles successfully.

[0054] This step tests whether the migrated business code compiles successfully. After all business code has been compiled without errors, the original default Tomcat application server is replaced with the domestically developed middleware. Specifically, after completing the code migration and parameter configuration, the Spring Boot project is compiled using Maven in the IDEA tool. Errors encountered during compilation are resolved, dependencies required by the original business code are added, and any forgotten configuration parameters are corrected. After all code has been compiled without errors, the build configuration for the domestically developed middleware is added to the pom.xml file, replacing the original default Tomcat. After configuration, the domestically developed middleware is verified to be effective by compiling with Maven. If the compilation is error-free, the next step is to verify the use of the domestically developed middleware to start the Spring Boot application. This includes the following steps.

[0055] S1041 resolves errors encountered during the compilation process of a Spring Boot project using Maven in the IDEA tool, including adding dependencies required for business logic and correcting forgotten configuration parameters.

[0056] Business logic code refers to the business logic code migrated from Spring MVC to Spring Boot, such as Controllers, Services, and Daos. Because Spring MVC and Spring Boot use different dependency management methods, Spring MVC typically requires manual dependency management (such as spring-webmvc, servlet-api, etc.), while Spring Boot automatically manages most dependencies through Starters (such as spring-Boot-starter-web). Additionally, the original Spring MVC project may depend on certain third-party libraries, such as database drivers, toolkits, and security frameworks, but these dependencies may not be explicitly declared in Spring Boot's pom.xml, leading to compilation errors. Some dependencies may require version adjustments in Spring Boot, necessitating manual addition or upgrades. Therefore, if errors occur during compilation, the dependencies required by the business logic code can be added.

[0057] Missing configuration parameters refer to configuration items in the original SpringMVC project. Commonly forgotten configuration parameters include database connection parameters, middleware configurations such as Redis and MQ, IAM-related parameters, static resource paths or view resolvers, and environment variables or profile configurations. Because the two frameworks have different configuration methods—Spring Boot advocates convention over configuration, but some custom configurations need to be explicitly declared—and because the original SpringMVC configuration may be scattered across multiple files (such as XML, Properties, annotations, etc.), each configuration needs to be checked during migration. Therefore, during the migration process, it is necessary to verify the original SpringMVC configuration item by item to ensure that all necessary dependencies and parameters are correctly declared in Spring Boot; otherwise, compilation failures or runtime exceptions may occur.

[0058] S1042. After all business code has been compiled without errors, add the build configuration of the domestic IT middleware to the pom.xml file to replace the original default Tomcat application server.

[0059] This step replaces the default Tomcat server with a domestically developed middleware to meet the requirements of the domestic IT innovation initiative and resolve compatibility issues. Specifically, in pom.xml, the Tomcat dependency included with Spring Boot is excluded to remove the Tomcat dependency, and the Spring Boot adaptation dependency of the domestically developed middleware is included to add the middleware dependency. Then, the middleware port and context path are specified in application.yml to configure the middleware parameters. This step ensures that the dependency version of the domestically developed middleware is compatible with Spring Boot. If the middleware requires a license file, it must be placed in the specified path.

[0060] S1043, verify whether the compiling of the domestic IT middleware via Maven is effective. If the compilation is error-free, verify the use of the domestic IT middleware to start the Spring Boot framework application.

[0061] This step confirms that the domestic IT middleware has successfully replaced Tomcat and that the Spring Boot application can start normally. Specifically, first, compile the project, including executing Maven commands in IDEA. If compilation is successful, a deployable `target / your-app.jar` will be generated. Then, start the application and verify the middleware, including running the JAR file, checking log output, and confirming the middleware name and startup port. Finally, perform functional testing, including accessing the local test environment's access address to verify that IAM login and business interfaces are working correctly. If middleware-related errors occur (such as class loading failures), check dependency conflicts or middleware configuration.

[0062] S105, a new WebConfig configuration class has been added.

[0063] Adding a WebConfig configuration class to the Spring Boot framework indicates that the WebConfig configuration class is for web-related configurations and implements the WebMvcConfigurer interface.

[0064] In the original SpringMVC project, the required Servlets, filters, listeners, welcome files, error pages, context parameters, etc., were configured through web.xml. However, after the framework is transformed into SpringBoot, web.xml configuration files are no longer supported. Therefore, it is necessary to manually add a WebConfig configuration class to inject the required Servlets, filters, listeners, etc. for them to take effect. The name of this configuration class can be customized, but it needs to be specified as a web-related configuration, and the configuration class needs to implement the WebMvcConfigurer interface.

[0065] Based on the original web configuration of a Spring MVC project, including the context path for API access (excluding static resources), view resolvers, filters, and interceptors, the specific steps are as follows.

[0066] S1051, for the context path of project access, override the configurePathMatch method, and add a prefix to the access path using the addPathPrefix() method in the configurePathMatch method.

[0067] For the context path of project access, including the access path of static resources, interface paths, and JSP front-end interface, you can override the configurePathMatch method and add a prefix to the access path using the addPathPrefix() method. This path does not affect the access of static resources, but only applies to the path prefix of interface access. If you want to add a path prefix for the entire project, you can add the server.servlet.context-path configuration parameter in the configuration file.

[0068] S1052, for the ViewResolver of the front-end JSP interface, the ViewResolver object is injected through the @Bean annotation, the resolver prefix is ​​added through setPrefix(), and the resolver suffix is ​​added through setSuffix().

[0069] For the ViewResolver parser of the front-end JSP interface, the ViewResolver object is injected through the @Bean annotation, a parser prefix is ​​added through setPrefix(), and a parser suffix is ​​added through setSuffix(). The purpose of these prefixes and suffixes is to concatenate the prefix and suffix with the returned JSP file name to obtain the relative path to the corresponding JSP file when accessing the JSP interface through the API, thereby retrieving the front-end code of the project.

[0070] S1053. For filters and interceptors, the FilterRegistrationBean<“Filter to be injected”> is injected using the @Bean annotation to make it effective. The URL pattern of the filter is set using the addUrlPatterns() method, the priority is set using the setOrder() method, and the initialization parameters of the filter are set using the addInitParameter() method.

[0071] For filters and interceptors, the FilterRegistrationBean<“Filter to be injected”> is injected using the @Bean annotation to make it effective; the addUrlPatterns() method sets the URL pattern of the filter, and the setOrder() method sets the priority to arrange the triggering order in the case of multiple filters. The smaller the number, the higher the priority. The addInitParameter() method can also be used to set the filter initialization parameters, etc.

[0072] S106, Modify the method of accessing the front-end JSP interface.

[0073] This step configures how the Spring Boot framework accesses the front-end JSP interface, including using the Controller interface to redirect to the initial JSP interface and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

[0074] In the original SpringMVC framework project, the front-end JSP interface was accessed by configuring the initial access interface in web.xml to redirect to the JSP. Now that SpringMVC has been transformed into a SpringBoot project, the web.xml configuration file no longer takes effect. Therefore, it is necessary to modify the way to access the front-end JSP interface. Currently, the method of calling the Controller interface is used to redirect to the initial JSP interface. The URL path of the interface is the browser link to access the platform's initial interface.

[0075] When accessing a JSP page by calling an API, it's important to note that the Controller class must be annotated with `@Controller`, the API cannot use the `@ResponseBody` annotation, and the returned string should be the JSP filename. Ensure that the path concatenated with the filename and the view resolver configured in WebConfig is a relative path to the JSP file within the webapp package.

[0076] S107, Local test to see if the IAM system is working.

[0077] After completing the Controller interface, test whether the IAM platform integrated with the Spring Boot framework is effective. If you can log in using the original IAM platform account information, it means that the integrated IAM platform is effective. If the integrated IAM platform is not effective, add a new WebConfig configuration class in the Spring Boot framework.

[0078] Specifically, after completing the Controller interface writing, test whether the IAM integration is effective. Note that because a unified authentication system is integrated, unauthorized errors will occur when calling the interface and accessing the JSP page if an authentication token is not configured. Therefore, before testing, you need to switch the IAM authentication mode to development mode in the configuration file. This will skip authentication. Before deploying the project, switch the mode back to production mode. If you can log in using your original data governance platform account information during testing, the IAM integration is successful.

[0079] S108, Verify whether the business functions are normal.

[0080] After successfully logging into your IAM account, you need to test whether the various functions in the business system are working properly. Before verifying the functions, you need to configure the login user ID and authentication token in the browser's cookies and sessions, respectively. Specifically, after successfully logging into the IAM platform, configure the login user ID and authentication token in the browser's cookies and sessions, respectively, and test whether the various functions in the business system are working properly based on the user ID and authentication token.

[0081] The foregoing has described in detail an embodiment of an adaptation method for the Spring Boot framework to the IAM platform. Based on the Spring Boot framework adaptation method for the IAM platform described in the above embodiment, this embodiment of the invention also provides an adaptation system for the Spring Boot framework to the IAM platform corresponding to the method.

[0082] Figure 3This is a schematic block diagram of an adaptation system structure for the Spring Boot framework to the IAM platform, provided as an embodiment of the present invention. In this embodiment, the Spring Boot framework adaptation system 300 for the IAM platform can be divided into multiple functional modules according to its functions. A module, as referred to in this invention, is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory.

[0083] Framework platform integration module 310 is used to integrate the Spring Boot framework with the IAM platform.

[0084] The code migration module 320 is used to migrate the original business code and front-end code of the SpringMVC framework to the SpringBoot framework that has been integrated with the IAM platform.

[0085] The configuration file parameter copying module 330 is used to copy parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file.

[0086] The code compilation test module 340 is used to test whether the compilation of the migrated business code is successful. After all business code has been compiled without errors, the original default Tomcat application server is replaced with the domestic IT innovation middleware.

[0087] A new WebConfig configuration class module 350 has been added. This module is used to add WebConfig configuration classes in the Spring Boot framework. It indicates that the WebConfig configuration class is for web-related configurations and implements the WebMvcConfigurer interface.

[0088] The 360 ​​module configures how to access the front-end JSP interface in the Spring Boot framework. This includes options such as using a Controller interface call to redirect to the initial JSP interface and using the URL path of the Controller interface call to access the browser link of the platform's initial interface.

[0089] In some optional implementations, system 300 also includes an IAM effectiveness test module 370, which is used to test whether the IAM platform connected to the Spring Boot framework is effective after the Controller interface is written. If the login can be completed using the original IAM platform account information, it means that the connected IAM platform is effective. If the connected IAM platform is not effective, a new WebConfig configuration class is added in the Spring Boot framework.

[0090] In some optional implementations, system 300 also includes a business function verification module 380, which is used to configure the logged-in user ID and the authorization token in the browser's cookie and session respectively after successfully logging into the IAM platform; and to test whether the various functions in the business system are normal based on the user ID and the authorization token.

[0091] The Spring Boot framework integration system for the IAM platform in this embodiment is used to implement the aforementioned Spring Boot framework integration method for the IAM platform. Therefore, the specific implementation of this system can be found in the embodiment section of the Spring Boot framework integration method for the IAM platform mentioned above. Thus, the specific implementation can be referred to the description of the corresponding embodiments, which will not be elaborated here.

[0092] In addition, since the Spring Boot framework integration system of this embodiment is used to implement the aforementioned Spring Boot framework integration method of the IAM platform, its function corresponds to the function of the above method, and will not be described again here.

[0093] Figure 4 A schematic diagram of a terminal 400 provided in an embodiment of the present invention includes: a processor 410, a memory 420, and a communication unit 430. The processor 410 is used to implement the following steps when executing the Spring Boot framework interface adaptation program stored in the memory 420 for connecting to the IAM platform: Integrate the Spring Boot framework with the IAM platform; The original business logic and front-end code of the SpringMVC framework were migrated to the SpringBoot framework, which is now integrated with the IAM platform. Copy the parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file; Test whether the migrated business code compiles successfully. After all business code has been compiled without errors, replace the original default Tomcat application server with the domestically developed middleware. Add a WebConfig configuration class to the Spring Boot framework to indicate that the WebConfig configuration class is for web-related configurations and that the WebConfig configuration class implements the WebMvcConfigurer interface; Configure the way to access the front-end JSP interface in the Spring Boot framework, including using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

[0094] The terminal 400 includes a processor 410, a memory 420, and a communication unit 430. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It can be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0095] The memory 420 can be used to store the execution instructions of the processor 410. The memory 420 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 420 are executed by the processor 410, the terminal 400 is able to perform some or all of the steps in the above method embodiments.

[0096] The processor 410 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 420, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 410 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0097] The communication unit 430 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It can receive user data sent by other terminals or send user data to other terminals.

[0098] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0099] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0100] The computer storage medium stores the Spring Boot framework adapter for the IAM platform. When the Spring Boot framework adapter for the IAM platform is executed by the processor, it performs the following steps: Integrate the Spring Boot framework with the IAM platform; The original business logic and front-end code of the SpringMVC framework were migrated to the SpringBoot framework, which is now integrated with the IAM platform. Copy the parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file; Test whether the migrated business code compiles successfully. After all business code has been compiled without errors, replace the original default Tomcat application server with the domestically developed middleware. Add a WebConfig configuration class to the Spring Boot framework to indicate that the WebConfig configuration class is for web-related configurations and that the WebConfig configuration class implements the WebMvcConfigurer interface; Configure the way to access the front-end JSP interface in the Spring Boot framework, including using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

[0101] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0102] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

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

[0104] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0105] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for adapting the Spring Boot framework to the IAM platform, characterized in that, Includes the following steps: Integrate the Spring Boot framework with the IAM platform; The original business logic and front-end code of the SpringMVC framework were migrated to the SpringBoot framework, which is now integrated with the IAM platform. Copy the parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file; Test whether the migrated business code compiles successfully. After all business code has been compiled without errors, replace the original default Tomcat application server with the domestically developed middleware. Add a WebConfig configuration class to the Spring Boot framework to indicate that the WebConfig configuration class is for web-related configurations and that the WebConfig configuration class implements the WebMvcConfigurer interface; Configure the way to access the front-end JSP interface in the Spring Boot framework, including using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

2. The adaptation method for Spring Boot framework to IAM platform according to claim 1, characterized in that, The business logic and front-end code of the original SpringMVC framework were migrated to the SpringBoot framework, which is now integrated with the IAM platform. Specifically, this included: While keeping the path unchanged, migrate the business code of the original SpringMVC framework project to the SpringBoot framework project; Migrate the front-end code of the SpringMVC framework to the SpringBoot framework project; Add a project startup class to the Spring Boot framework project code. The path should be placed in the same directory as the business code.

3. The adaptation method for Spring Boot framework to IAM platform according to claim 1, characterized in that, Copy the parameters from the original Spring MVC framework configuration file to the Spring Boot framework configuration file, specifically including: Copy the parameters from the configuration file in the SpringMVC project to the configuration file under the resources package in the SpringBoot project; if the relevant configuration file does not exist, recreate the configuration file and then copy the parameters.

4. The adaptation method for Spring Boot framework to IAM platform according to claim 1, characterized in that, Test whether the migrated business code compiles successfully. After all business code has been compiled without errors, replace the original default Tomcat application server with the domestically developed middleware, specifically including: In the IDEA tool, the Spring Boot project is compiled using Maven, and errors that occur during the compilation process are resolved, including adding dependencies required for business code and forgetting configuration parameters; After all business code has been compiled without errors, add the build configuration of the domestic IT middleware to the pom.xml file to replace the original default Tomcat application server; Test whether the domestic IT middleware is effective by compiling it with Maven. If the compilation is error-free, verify that the Spring Boot framework application is started using the domestic IT middleware.

5. The adaptation method for Spring Boot framework to IAM platform according to claim 1, characterized in that, In the Spring Boot framework, add a new WebConfig configuration class, specifically including: For the context path accessed by the project, override the configurePathMatch method and add a prefix to the access path using the addPathPrefix() method in the configurePathMatch method; For the ViewResolver in the front-end JSP interface, the ViewResolver object is injected using the @Bean annotation, a resolver prefix is ​​added using setPrefix(), and a resolver suffix is ​​added using setSuffix(). For filters and interceptors, inject FilterRegistrationBean<"Filter to be injected"> using the @Bean annotation to make it effective. Set the URL pattern of the filter using the addUrlPatterns() method, set the priority using the setOrder() method, and set the filter's initialization parameters using the addInitParameter() method.

6. The adaptation method for Spring Boot framework to IAM platform according to claim 1, characterized in that, When configuring the Spring Boot framework to access the front-end JSP interface, configure the Controller class to use the @Controller annotation, the Controller interface cannot use the @ResponseBody annotation, and the returned string is the JSP file name, so that the path concatenated with the file name and the view resolver configured in WebConfig is the relative path of the JSP file under the webapp package.

7. The adaptation method for Spring Boot framework to IAM platform according to claim 1, characterized in that, The method also includes the following steps: After completing the Controller interface, test whether the IAM platform connected to the Spring Boot framework is effective. If you can log in using the original IAM platform account information, it means that the connected IAM platform is effective. If the connected IAM platform is not effective, add a new WebConfig configuration class in the Spring Boot framework. After successfully logging into the IAM platform, configure the user ID and authentication token in the browser's Cookie and Session respectively; Based on the user ID and permission authentication token, test whether each function in the business system is working properly.

8. An adaptation system for the Spring Boot framework to interface with the IAM platform, characterized in that, include: The framework platform integration module is used to integrate the Spring Boot framework with the IAM platform; The code migration module is used to migrate the original business code and front-end code of the SpringMVC framework to the SpringBoot framework that has been integrated with the IAM platform. The configuration file parameter copy module is used to copy parameters from the original SpringMVC framework configuration file to the SpringBoot framework configuration file. The code compilation test module is used to test whether the migrated business code compiles successfully. After all business code has been compiled without errors, the original default Tomcat application server is replaced with the domestic IT innovation middleware. A new WebConfig configuration class module has been added. This module is used to add WebConfig configuration classes in the Spring Boot framework. It indicates that the WebConfig configuration class is for web-related configurations and implements the WebMvcConfigurer interface. The module for configuring the access method to the front-end JSP interface is used to configure the access method to the front-end JSP interface in the Spring Boot framework. This includes using the method of calling the Controller interface to jump to the initial JSP interface, and using the URL path of the Controller interface to implement the browser link to access the platform's initial interface.

9. A terminal, characterized in that, include: The storage is used to store the Spring Boot framework's adapter program for connecting to the IAM platform; The processor is configured to implement the steps of the Spring Boot framework IAM platform adaptation method as described in any one of claims 1 to 7 when executing the Spring Boot framework IAM platform adapter program.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores an adapter program for the Spring Boot framework to interface with the IAM platform. When the Spring Boot framework to interface with the IAM platform adapter program is executed by the processor, it implements the steps of the Spring Boot framework to interface with the IAM platform adapter method as described in any one of claims 1 to 7.