CN115794096A - Web application framework conversion method and device - Google Patents

Web application framework conversion method and device Download PDF

Info

Publication number
CN115794096A
CN115794096A CN202211231352.9A CN202211231352A CN115794096A CN 115794096 A CN115794096 A CN 115794096A CN 202211231352 A CN202211231352 A CN 202211231352A CN 115794096 A CN115794096 A CN 115794096A
Authority
CN
China
Prior art keywords
file
frame
conversion
framework
web application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211231352.9A
Other languages
Chinese (zh)
Inventor
陈选旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD
Original Assignee
WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD filed Critical WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD
Priority to CN202211231352.9A priority Critical patent/CN115794096A/en
Publication of CN115794096A publication Critical patent/CN115794096A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a web application framework conversion method and a device, wherein the web application framework conversion method comprises the following steps: determining a first frame file; disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file; and under the condition that the configuration file and the test file are determined to be included in the target folder, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file. The method reduces the conversion amount of the first frame file and the probability of human errors, and improves the conversion efficiency of the application frame.

Description

Web application framework conversion method and device
Technical Field
The invention relates to the technical field of computer networks, in particular to a web application framework conversion method and device.
Background
Along with the update iteration of a World Wide Web (global local area network) application framework, the adaptation degree of an old application framework and an emerging technology is reduced, and the development process of research personnel is effectively shortened due to the appearance of a spring boot and other new frameworks.
In the related art, because the web application framework adopted by the traditional project is relatively complete in function, most of the traditional projects still use the old frameworks for project development and maintenance, for example, most of the projects currently adopt struts2 frameworks, when the projects are transferred from the struts2 frameworks to the spring boot and other new frameworks, a lot of manpower and time are needed to replace a large number of project files one by one, and the project file conversion often fails due to human errors, so that the conversion efficiency of the application framework of the project is reduced, and the project development and maintenance are limited.
Disclosure of Invention
The invention provides a web application framework conversion method and a web application framework conversion device, which are used for solving the defects that a large amount of manpower and time are consumed to convert files one by one when an application framework of a project is upgraded in the prior art, and the conversion of the application framework fails due to human errors, and improve the conversion efficiency of the application framework of the project.
The invention provides a web application framework conversion method, which comprises the following steps:
determining a first frame file, wherein the first frame file is a file to be converted from a first frame to a second frame;
disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file, wherein the target folder comprises a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used for storing an application code of the first frame file;
and under the condition that the configuration file and the test file are determined to be included in the target folder, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
According to the web application framework conversion method provided by the invention, the configuration file comprises a plurality of subfiles, the configuration file is converted based on the configuration information of the second framework to obtain a conversion file, and the method comprises the following steps:
retrieving a target subfile of the plurality of subfiles that is not managed by the second framework, resulting in a relative path of the target subfile;
and creating a starting class of the second frame, and scanning the relative path of the target subfile based on the starting class to obtain a conversion file corresponding to the configuration file.
According to the web application framework conversion method provided by the invention, the target subfile comprises a web.xml file, and the step of creating the starting class of the second framework comprises the following steps:
creating a first scan class of the second framework and configuring the web.xml file in the first scan class;
rewriting the interceptors defined in the web.xml file in a bean annotation mode, and obtaining the starting class of the second framework under the condition of determining the Order of the interceptors.
According to the web application framework conversion method provided by the invention, the target subfile is a jar file, and the step of creating the starting class of the second framework specifically comprises the following steps:
creating a Maven project object model corresponding to the second frame;
and converting the jar file into a pom.
According to the web application framework conversion method provided by the present invention, after the conversion file and the test file are assembled based on the structural information of the second framework to obtain a second framework file, the method further comprises:
importing the second frame file into a third-party development tool for detection, and determining a missing package corresponding to the second frame file under the condition that the third-party development tool detects errors;
and adding a dependent package corresponding to the missing package in a pom.xml file corresponding to the second frame file to obtain an updated second frame file, and operating the updated second frame file.
The invention provides a web application framework conversion device, which comprises:
the system comprises a selection module, a first frame file and a second frame file, wherein the selection module is used for determining the first frame file which is to be converted from a first frame to a second frame;
a disassembling module, configured to disassemble the first frame file according to a preset disassembling order to obtain a target folder corresponding to the first frame file, where the target folder includes a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used to store an application code of the first frame file;
and the conversion module is used for converting the configuration file based on the configuration information of the second frame to obtain a conversion file under the condition that the target folder is determined to comprise the configuration file and the test file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
According to the web application framework conversion device provided by the invention, the device further comprises:
the verification module is used for importing the second frame file into a third-party development tool for detection after the conversion file and the test file are assembled based on the structural information of the second frame to obtain the second frame file, and determining a missing packet corresponding to the second frame file under the condition that the third-party development tool detects and reports errors;
and the running module is used for adding the dependent package corresponding to the missing package in the pom.xml file corresponding to the second frame file to obtain an updated second frame file, and running the updated second frame file.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the web application framework conversion method.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a web application framework conversion method as described in any of the above.
The present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a web application framework conversion method as described in any one of the above.
According to the web application framework conversion method and device, under the condition that the configuration file and the test file exist in the disassembled first framework file at the same time, the configuration file is automatically converted or partially manually intervened according to the configuration information of the second framework, the application codes in the test file are directly multiplexed and reassembled with the conversion file according to the framework of the second framework, the second framework file is obtained, the conversion amount of the first framework file and the probability of human errors are reduced, and the conversion efficiency of the application framework is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a web application framework transformation method provided by the present invention;
FIG. 2 is a second flowchart of the web application framework conversion method provided by the present invention;
FIG. 3 is an interaction diagram of transforming struts2 frame into spring boot frame according to the present invention;
FIG. 4 is a schematic structural diagram of a web application framework conversion device provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The web application framework conversion method and apparatus of the present invention are described below with reference to fig. 1-4.
Fig. 1 is a schematic flowchart of a web application framework conversion method provided by the present invention, and as shown in fig. 1, the web application framework conversion method includes: step 110, step 120 and step 130.
Step 110, determining a first frame file, wherein the first frame file is a file to be converted from a first frame to a second frame.
In this step, the first framework may be struts2, struts2 is a Web application framework based on the MVC design pattern, struts2 is an updated product of struts, and is a brand new struts framework merged based on the technologies of struts 1 and Web Work.
In this step, the first framework file is a file in which project development or maintenance is performed under the first framework.
In this step, the second framework may be a spring boot or other new web application framework.
In other embodiments, the first frame may also be another frame of the struts series.
Step 120, disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file, where the target folder includes a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used for storing an application code of the first frame file.
It should be noted that the first framework is mainly composed of a core controller, a service controller and a service logic component, and the disassembling of the first framework file may be performed one by one according to configuration parameters respectively corresponding to the core controller, the service controller and the service logic component of the first framework file.
In this step, the preset disassembly order may be defined and set according to the actual requirements of the user, for example, the disassembly order may be sequentially disassembled according to the configuration parameters corresponding to the core controller, the service controller, and the service logic component, so as to obtain the disassembled folder or subfile, for example, a struts2 project file is sequentially disassembled according to the three components of struts2, so as to obtain an src directory corresponding to the struts2 project file, where the directory includes configuration files and test files of different formats, and the test file may store java codes.
In some embodiments, the first frame can be disassembled and classified by means of a project disassembling tool, so that the disassembling efficiency of the first frame file can be improved.
In some embodiments, the disassembled first frame file does not have the src directory or the subfile under the src directory, and the first frame file is considered to be failed to be disassembled.
Step 130, under the condition that the target folder is determined to include the configuration file and the test file, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
In this step, the process of converting the first frame file into the second frame file is substantially the process of converting the first frame into the second frame.
In this step, the configuration file may be one or more, for example, the configuration file may be one or more of a database configuration file under the src directory, a struts. The test file is a file for storing application code, for example, the test file may be a file for storing java program code under the src directory.
Fig. 2 is a second flowchart of the web application framework conversion method provided by the present invention, in the embodiment shown in fig. 2, after the first framework (corresponding to struts 2) file is disassembled according to the preset disassembling sequence, all cached disassembled files and folders are traversed, when it is determined that the disassembled target folder includes core files such as configuration files and test files, the disassembling process of the first framework file is completed, otherwise, the disassembling fails.
It should be noted that, when the application framework of the first framework file is upgraded, the configuration information of the first framework file is mainly matched or converted, and the application program contained in the test file can be directly reused without conversion.
In the embodiment shown in fig. 2, there are generally a plurality of configuration files in the target folder, and when the configuration files are converted according to the configuration information of the second frame, all the configuration files in the target folder may be converted, or part of the configuration files may be converted, so that after determining the folder or the subfile to be converted, the subfile to be converted is converted by using the conversion code corresponding to the conversion when converting the first frame into the second frame, and the obtained conversion file and the test file that does not need to be converted are reassembled according to the architecture information of the second frame, so as to obtain the second frame file.
In this embodiment, the folder or the subfile to be converted may be determined from a file name, a file content, or a file suffix.
In some embodiments, the src directory may be directly replaced with the newly generated spring boot, and whether the conversion process is executed or not is prompted each time in the replacement process, and when the execution is confirmed, the execution proceeds to the next step.
According to the web application framework conversion method, under the condition that the configuration file and the test file exist in the disassembled first framework file at the same time, the configuration file is automatically converted or partially intervened manually according to the configuration information of the second framework, application codes in the test file are directly reused and reassembled with the conversion file according to the framework of the second framework, the second framework file is obtained, the conversion amount and the probability of human errors of the first framework file are reduced, and the conversion efficiency of the application framework is improved.
In some embodiments, the configuration file comprises a plurality of subfiles, and converting the configuration file based on the configuration information of the second framework to obtain a converted file comprises: retrieving a target subfile which is not managed by the second frame in the plurality of subfiles to obtain a relative path of the target subfile; and creating a starting class of the second frame, and scanning the relative path of the target subfile based on the starting class to obtain a conversion file corresponding to the configuration file.
In this embodiment, the plurality of subfiles may be at least two of a database configuration file under the src directory, a file suffixed with xml, and a file suffixed with properties.
In this embodiment, the src directory obtained after the first frame file is disassembled is the main directory of the disassembled file, and some sub-files are also stored under the directory, and these sub-files may not be managed under the second frame (spring boot), that is, there is a spring boot that cannot identify the sub-files.
Fig. 3 is an interaction diagram for converting a struts2 frame into a spring boot frame, where in the embodiment shown in fig. 3, a first frame (struts 2) file needs to depend on Tomcat when being deployed with an external container, and a spring boot with the Tomcat itself can create a boot class of the spring boot, scan a path where a conversion file is located under the boot class of the spring boot, and implement management of the conversion file by the spring boot after traversing and scanning the migrated configuration file.
In this embodiment, after the management of the conversion file is implemented by using the startup class of the spring boot, the conversion file and the test file may be assembled according to the framework of the spring boot, and finally the spring boot project file, that is, the second frame file, is obtained.
According to the web application framework conversion method, the relative path of the conversion file is scanned by constructing the starting class corresponding to the second framework, so that the second framework manages the conversion file, the adaptation of configuration information among different web application frameworks is realized, and the conversion efficiency of the first framework file is improved.
Xml file, the step of creating a launch class for the second framework comprising: creating a first scanning class of a second framework, and configuring a web.xml file in the first scanning class; xml file, and in the case of determining the Order of the interceptors, obtaining the start class of the second framework.
In this embodiment, since the most important first step of the spring startup is to scan the class information that needs to be managed by the spring, a first scan class needs to be added in the spring boot, so as to convert or configure the web.xml file in the first scan class.
Xml file is the core file of struts2 project in this embodiment, the xml file is used to configure interceptors, the xml file is introduced in the first scan class of spring boot, the configuration code of the original web
@ImportResource(locations={
"classpath:application-context.xml",
"classpath:dispatcher-servlet.xml"
})
In the embodiment shown in fig. 3, when the web.xml file is converted, the interceptors defined in the web.xml file are rewritten in a Bean annotation manner, and the Order of the interceptors is determined by Order, as shown in the following codes:
Figure BDA0003880964450000091
and obtaining a starting class of a second framework aiming at the web.xml file based on the steps.
Xml file content may be rewritten according to the actual needs of the user in some embodiments.
According to the web application frame conversion method provided by the invention, the configuration of the web.xml file is completed by creating the first scanning class, and the starting class of the second frame corresponding to the web.xml file is obtained in a bean annotation and Order mode, so that the conversion efficiency of the configuration file taking xml as suffix is improved.
In some embodiments, the target subfile is a jar file, and the step of creating a start class of the second framework specifically includes: creating a Maven project object model corresponding to the second frame; and converting the jar file into a pom.
In this embodiment, the target subfile may be a jar file under a different path, for example, the target subfile may be "webRoot/lib/. Jar".
In the embodiment shown in FIG. 3, when converting jar files under webRoot/lib/under src directory, the first skeleton file is usually introduced into the location where the jar files of the third party are stored; and the third party of the spring boot is introduced and handed over to the Maven project object model for management, after the pom.
In some embodiments, the target subfile is a custom jar package, and the custom set content is configured according to a pom.
In the embodiment shown in fig. 3, when the target subfile is a file with properties as a suffix, in both the struts2 and the spring boot project, the target subfile can be identified as a corresponding configuration file by using suffix information of the properties, and can be directly converted when the target subfile is converted. However, the configuration file of the spring boot project is generally in application.
In some embodiments, when the target subfile includes static resources such as jsp files, imgs, and css, the write target subfile may be multiplexed directly without conversion.
According to the web application framework conversion method, conversion of jar files is achieved by creating the Maven project object model corresponding to the second framework, and conversion efficiency of configuration files with jar as suffix is improved.
In some embodiments, after assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file, the method further includes: importing the second frame file into a third-party development tool for detection, and determining a missing package corresponding to the second frame file under the condition that the third-party development tool detects and reports errors; adding a dependent package corresponding to the missing package in the pom.xml file corresponding to the second frame file to obtain an updated second frame file, and operating the updated second frame file.
In this embodiment, the third party development tool may be an idea or eclipse or the like tool.
In this embodiment, the second framework file is imported into the development tool idea or eclipse for debugging and running, so as to detect whether the second framework file is assembled correctly.
In this embodiment, in a case where an error report in the debugging operation may be performed, if a lost data packet, that is, a missing packet, exists in the spring boot file, a dependency corresponding to the missing packet may be added in a pom.xml file corresponding to the spring boot, and at this time, the Maven project object model may automatically download the dependency corresponding to the missing packet from the network; and outputting the spring boot file after the operation is correct.
It should be noted that, because the data packet of the spring boot is referred to by the Maven project object model for management, networking is needed to ensure that the Maven project object model management can download the corresponding dependent packet from the network.
According to the web application framework conversion method, the second framework file is imported into a development tool for debugging, and the dependency package corresponding to the missing package is directly added into the pom.
The web application framework conversion apparatus provided by the present invention is described below, and the web application framework conversion apparatus described below and the web application framework conversion method described above may be referred to correspondingly.
Fig. 4 is a schematic structural diagram of the web application framework conversion method provided by the present invention, and as shown in fig. 4, the web application framework conversion apparatus includes: a selection module 410, a decommissioning module 420, and a conversion module 430.
A selecting module 410, configured to determine a first frame file, where the first frame file is a file to be converted from a first frame to a second frame;
the disassembling module 420 is configured to disassemble the first frame file according to a preset disassembling order to obtain a target folder corresponding to the first frame file, where the target folder includes a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used to store an application code of the first frame file;
the conversion module 430 is configured to, when it is determined that the target folder includes the configuration file and the test file, convert the configuration file based on the configuration information of the second frame to obtain a conversion file, and assemble the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
According to the web application framework conversion device provided by the invention, under the condition that the configuration file and the test file exist in the disassembled first framework file at the same time, the configuration file is automatically converted or partially manually intervened according to the configuration information of the second framework, the application codes in the test file are directly multiplexed and reassembled with the conversion file according to the framework of the second framework to obtain the second framework file, the conversion amount and the probability of human errors of the first framework file are reduced, and the conversion efficiency of the application framework is improved.
In some embodiments, the web application framework conversion apparatus further includes:
the verification module is used for importing the second frame file into a third-party development tool for detection after the conversion file and the test file are assembled based on the structural information of the second frame to obtain the second frame file, and determining a missing package corresponding to the second frame file under the condition that the third-party development tool detects and reports errors;
and the operation module is used for adding the dependency corresponding to the missing package in the pom.xml file corresponding to the second frame file to obtain the updated second frame file and operating the updated second frame file.
According to the web application framework conversion method, the second framework file is imported into a development tool for debugging, and the dependency package corresponding to the missing package is directly added into the pom.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor) 510, a communication Interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a web application framework translation method comprising: determining a first frame file, wherein the first frame file is a file to be converted from a first frame to a second frame; disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file, wherein the target folder comprises a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used for storing an application code of the first frame file; and under the condition that the configuration file and the test file are determined to be included in the target folder, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, a computer is capable of executing the web application framework conversion method provided by the above methods, and the method includes: determining a first frame file, wherein the first frame file is a file to be converted from a first frame to a second frame; disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file, wherein the target folder comprises a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used for storing an application code of the first frame file; and under the condition that the configuration file and the test file are determined to be included in the target folder, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements a web application framework conversion method provided by the above methods, the method including: determining a first frame file, wherein the first frame file is a file to be converted from a first frame to a second frame; disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file, wherein the target folder comprises a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used for storing an application code of the first frame file; and under the condition that the configuration file and the test file are determined to be included in the target folder, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A web application framework conversion method is characterized by comprising the following steps:
determining a first frame file, wherein the first frame file is a file to be converted from a first frame to a second frame;
disassembling the first frame file according to a preset disassembling sequence to obtain a target folder corresponding to the first frame file, wherein the target folder comprises a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used for storing an application code of the first frame file;
and under the condition that the configuration file and the test file are determined to be included in the target folder, converting the configuration file based on the configuration information of the second frame to obtain a conversion file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
2. The web application framework conversion method according to claim 1, wherein the configuration file comprises a plurality of subfiles, and the converting the configuration file based on the configuration information of the second framework to obtain a conversion file comprises:
retrieving a target subfile which is not managed by the second frame in the plurality of subfiles to obtain a relative path of the target subfile;
and creating a starting class of the second frame, and scanning the relative path of the target subfile based on the starting class to obtain a conversion file corresponding to the configuration file.
3. The web application framework conversion method according to claim 2, wherein the target subfile includes a web.xml file, and the step of creating the start class of the second framework specifically includes:
creating a first scan class of the second framework and configuring the web.xml file in the first scan class;
rewriting the interceptors defined in the web.xml file in a bean annotation mode, and obtaining the starting class of the second framework under the condition of determining the Order of the interceptors.
4. The method for converting a web application framework according to claim 2, wherein the target subfile is a jar file, and the step of creating the start class of the second framework further comprises:
creating a Maven project object model corresponding to the second frame;
and converting the jar file into a pom.
5. The web application framework conversion method according to any one of claims 1 to 4, wherein after the converting file and the testing file are assembled based on the structural information of the second framework to obtain a second framework file, the method further comprises:
importing the second frame file into a third-party development tool for detection, and determining a missing package corresponding to the second frame file under the condition that the third-party development tool detects errors;
and adding a dependent package corresponding to the missing package in a pom.xml file corresponding to the second frame file to obtain an updated second frame file, and operating the updated second frame file.
6. A web application framework conversion apparatus, comprising:
the system comprises a selection module, a first frame file generation module and a second frame file generation module, wherein the selection module is used for determining a first frame file which is a file to be converted from a first frame to a second frame;
a disassembling module, configured to disassemble the first frame file according to a preset disassembling order to obtain a target folder corresponding to the first frame file, where the target folder includes a configuration file of the first frame file and/or a test file of the first frame file, and the test file is used to store an application code of the first frame file;
and the conversion module is used for converting the configuration file based on the configuration information of the second frame to obtain a conversion file under the condition that the target folder is determined to comprise the configuration file and the test file, and assembling the conversion file and the test file based on the structural information of the second frame to obtain a second frame file.
7. The web application framework conversion apparatus according to claim 6, wherein the apparatus further comprises:
the verification module is used for importing the second frame file into a third-party development tool for detection after the conversion file and the test file are assembled based on the structural information of the second frame to obtain the second frame file, and determining a missing package corresponding to the second frame file under the condition that the third-party development tool detects and reports errors;
and the running module is used for adding the dependent package corresponding to the missing package in the pom.xml file corresponding to the second frame file to obtain an updated second frame file, and running the updated second frame file.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the web application framework conversion method according to any one of claims 1 to 6 when executing the program.
9. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the web application framework conversion method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the web application framework conversion method of any of claims 1 to 6.
CN202211231352.9A 2022-10-09 2022-10-09 Web application framework conversion method and device Pending CN115794096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211231352.9A CN115794096A (en) 2022-10-09 2022-10-09 Web application framework conversion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211231352.9A CN115794096A (en) 2022-10-09 2022-10-09 Web application framework conversion method and device

Publications (1)

Publication Number Publication Date
CN115794096A true CN115794096A (en) 2023-03-14

Family

ID=85432681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211231352.9A Pending CN115794096A (en) 2022-10-09 2022-10-09 Web application framework conversion method and device

Country Status (1)

Country Link
CN (1) CN115794096A (en)

Similar Documents

Publication Publication Date Title
US11561784B2 (en) Versioning of pipeline templates for continuous delivery of services on datacenters configured in cloud platforms
WO2012034440A1 (en) Method and device for generating database upgrading script
CN109908585B (en) File processing method and system, computing device and storage medium
US11392366B1 (en) Optimized compilation of pipelines for continuous delivery of services on datacenters configured in cloud platforms
US8965746B2 (en) System and method for validating an electrical network model
CN112084008A (en) Method for rapidly deploying cloud pipe system based on container technology
JP2007122135A (en) Development support device, development support method and development support program
CN111488151A (en) Method and device for page interaction among Android modules
Liu et al. Mv4ms: A spring cloud based framework for the co-deployment of multi-version microservices
CN114510262A (en) Interface request parameter verification method and device
US10656922B2 (en) Systems and methods for providing an application transformation tool
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
US20220244938A1 (en) Method and system for code maintenance
CN112395339A (en) Method and device for checking data access between systems, computer equipment and storage medium
CN115794096A (en) Web application framework conversion method and device
CN111338632A (en) Cloud platform mirror image construction method and device
CN110874226B (en) Android system function upgrading method
CN112657196A (en) Resource updating method and device, computer equipment and readable storage medium
CN111897557A (en) Method, device, equipment and storage medium for updating service system
CN113297038A (en) Monitoring and data processing method, device and equipment, monitoring system and data center
CN117744588B (en) Chip verification system and method
CN108874405A (en) A kind of OpenStack environment upgrade method
CN116302066A (en) Version making method, device, system, server, medium and product
CN111352637B (en) Method, device and equipment for deploying machine learning system
CN112631620B (en) Method, system, equipment and medium for manufacturing operating system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination