CN113721973A - Configuration file generation method, device, equipment and medium - Google Patents

Configuration file generation method, device, equipment and medium Download PDF

Info

Publication number
CN113721973A
CN113721973A CN202111047488.XA CN202111047488A CN113721973A CN 113721973 A CN113721973 A CN 113721973A CN 202111047488 A CN202111047488 A CN 202111047488A CN 113721973 A CN113721973 A CN 113721973A
Authority
CN
China
Prior art keywords
configuration file
target
configuration information
target object
template
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
CN202111047488.XA
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN202111047488.XA priority Critical patent/CN113721973A/en
Publication of CN113721973A publication Critical patent/CN113721973A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for generating a configuration file. The method comprises the following steps: and acquiring target configuration information according to the target object, calling a configuration file template of the target object, wherein the configuration file template comprises a modification item needing to be modified in the pre-marked current configuration information, and finally modifying the modification item into the target configuration information, thereby generating a target configuration file of the target object. By adopting the technical scheme, the aim of quickly and accurately generating the target configuration file corresponding to the target object can be fulfilled, and in the process of generating the target configuration file, because the target configuration information is accurately generated according to the target object, compared with the prior art, manual modification on a plurality of items of contents of the corresponding configuration file one by one according to the difference of the site environment and the server is not needed, so that human errors can be reduced, a large amount of time is saved, and the technical effect of quickly and accurately generating the target configuration file is achieved.

Description

Configuration file generation method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of network security products, in particular to a method, a device, equipment and a medium for generating a configuration file.
Background
In the big data era, big data management is very important, and enterprise big data management can be divided into enterprise internal data management such as clients, products, sales and inventory and enterprise external data management such as product service evaluation, intelligent information and industry information collection. Therefore, the enterprise big data management platform software has an important influence on the development of the enterprise.
The enterprise big data management platform comprises a plurality of open source components and application software, and the open source components and the application software are mutually dependent, when a project is delivered, the established enterprise big data management platform software needs to be installed, deployed, configured and debugged, when a corresponding configuration file needs to be installed and deployed on dozens of or even more servers, a corresponding IP address needs to be modified according to each server, and relevant configurations of the open source components and the application software need to be modified, for example, memory size, hard disk allocation and the like need to be modified one by one according to the field environment and server information.
When the scheme of deploying the big data management platform by using the existing method is used, a plurality of contents of the corresponding configuration files are modified according to different requirements of a field environment and a server, the workload is large, the time is consumed, and errors are easy to occur due to manual operation.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for generating a configuration file.
In a first aspect, an embodiment of the present invention provides a method for generating a configuration file, including:
acquiring target configuration information of a target object;
calling a configuration file template of the target object, wherein the configuration file template comprises modification items needing to be modified in the pre-marked current configuration information;
and modifying the modification item into the target configuration information to generate a target configuration file of the target object.
In a second aspect, an embodiment of the present invention provides a configuration file generating apparatus, including:
the target configuration information acquisition module is used for acquiring target configuration information of a target object;
the configuration file template calling module is used for calling a configuration file template of the target object, and the configuration file template comprises modification items needing to be modified in the pre-marked current configuration information;
and the modification item modification module is used for modifying the modification item into the target configuration information so as to generate a target configuration file of the target object.
In a third aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the configuration file generation method according to the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the configuration file generating method provided in the embodiment of the present invention.
According to the configuration file generation scheme provided by the embodiment of the invention, the target configuration information is obtained according to the target object, the configuration file template of the target object is called, wherein the configuration file template comprises the modification item needing to be modified in the pre-marked current configuration information, and finally the modification item is modified into the target configuration information, so that the target configuration file of the target object is generated. By adopting the technical scheme, the aim of quickly and accurately generating the target configuration file corresponding to the target object can be fulfilled, and in the process of generating the target configuration file, because the target configuration information is accurately generated according to the target object, compared with the prior art, manual modification on a plurality of items of contents of the corresponding configuration file one by one according to the difference of the site environment and the server is not needed, so that human errors can be reduced, a large amount of time is saved, and the technical effect of quickly and accurately generating the target configuration file is achieved.
Drawings
Fig. 1 is a schematic flowchart of a configuration file generation method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another configuration file generation method according to an embodiment of the present invention;
fig. 3 is a block diagram of a configuration file generating apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a configuration file generation method according to an embodiment of the present invention, where the method may be executed by a configuration file generation apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a computer device such as a server. As shown in fig. 1, the method includes:
and S110, acquiring target configuration information of the target object.
The target object represents a scheme to be deployed or a deployed scheme to be updated. The scheme to be deployed can be understood as a software or system scheme corresponding to a third-party enterprise big data management platform to be developed; the deployed scheme to be updated may be understood that when hardware information or software information in the deployed software or system scheme is changed or needs to be updated, relevant parameters in the current scheme also need to be updated accordingly, so as to optimize the existing deployed scheme.
It should be noted that, when a target object is deployed, the target object generally consists of multiple types of open source components and application software, each open source component and the application software depend on each other, and each type of open source component and each type of application software depend on a corresponding configuration file in a deployment phase, so that corresponding functions of the deployed target object are realized based on the corresponding configuration file. A configuration file may be understood as a collection of relevant settings and files for a software system to load a desired operating environment for a user when using or starting the software. It may include all user-specific configuration parameters such as program items, screen colors, network connections, printer connections, mouse settings, and window size and position, etc.
When a developer develops a target object, a third party generally informs the developer of the corresponding requirements of the target object required to be built in a file or character mode, the developer cannot configure corresponding parameters according to the actual software environment and the hardware environment of a third party enterprise when developing the target object, and after the primary development of the target object scheme is completed, the scheme deployment work can be performed on the target object according to the actual environment of the third party enterprise. In the prior art, some configuration parameters in configuration files corresponding to an Internet Protocol Address (Internet Protocol Address), an open source component and application software need to be modified manually according to different field environments and servers, so that more contents need to be modified, and the process is complicated.
According to the configuration file generation method provided by the embodiment of the invention, when the target object is deployed according to the site environment of the third-party enterprise, the target configuration information of the target object can be obtained according to the site actual environment, and the content contained in the current target configuration information can also be understood as information that the corresponding configuration parameters need to be modified according to the site environment when the target object is deployed in the prior art.
It should be noted that, according to the scheme, the target configuration information developer may write the configuration attribute (configuration) file in advance according to the target object and the actual environment information of the third-party enterprise, and the java program reads the content of the configuration attribute file into the java object. The java object may be understood as that, taking a server as an object, there is a class of the server, and the class includes attributes of the server, such as a server name and an IP address corresponding to the server.
It should be further noted that, compared with the prior art that the target configuration information is written in advance, the method for manually modifying the corresponding configuration information has the advantages that configuration parameters to be modified in the corresponding configuration files do not need to be manually searched one by one, and omission or modification errors may occur in the manual searching process.
S120, a configuration file template of the target object is called, wherein the configuration file template comprises modification items needing to be modified in the pre-marked current configuration information.
Since the developer does not develop the preliminary development scheme in the actual environment of the third-party enterprise, the preliminary development and actual deployment phases of the target object are performed, and the corresponding configuration parameters in the preliminary development scheme need to be modified so as to meet the actual environment of the target object. Therefore, when the target object is deployed according to the actual environment, the configuration file template of the target object may be called, so that the target configuration information obtained in step S110 may be applied to the configuration file template of the target object, and the corresponding file configuration work is completed.
The configuration file template of the target object may be understood that, in a development stage, a developer generates an initial configuration file corresponding to the target object according to a current development environment, and when configuring according to an actual environment, some information needs to be modified correspondingly according to information of a server, an open source component, application software and the like of the actual environment, but some information does not need to be modified. Therefore, the content which does not need to be modified in the target object can be extracted, and the content which needs to be modified is marked in advance to form the configuration file template of the target object.
When the content to be modified is marked in advance, the marked content is a modification item to be modified in the current configuration information, namely some configuration information in the current environment, and the marking is used for modifying the modification item to be modified in the current configuration information into target configuration information of the target object when the subsequent deployment is carried out according to the actual environment of the target object.
It should be noted that the content to be modified may be marked in advance by using a specific development language, and in the subsequent identification stage, the corresponding template engine may identify the marked language, so as to determine that the content currently marked is the content to be modified.
It should be further noted that, according to different environments of the target object, for example, different server scales, different network environments, and different open source components and application software that need to be installed, different pre-marked modification items included in the configuration file template of the target object are different, specifically based on the actual application environment of the target object, but the configuration file template of the corresponding target object can be represented in a manner of extracting content that does not need to be modified and pre-marking content that needs to be modified.
S130, modifying the modification item into target configuration information to generate a target configuration file of the target object.
When modifying the modification item into the target configuration information according to the modification item needing to be modified in the pre-marked current configuration information in the configuration file template, firstly, the pre-marked content is identified, so that the modification item is modified into the target configuration information, and as the rest content in the configuration file template is the content needing not to be modified, the target configuration file of the target object can be generated. The advantage of this is that the configuration file of all the components and applications can be generated quickly and accurately according to the target object, and the generation time does not exceed 5 seconds.
Illustratively, for example, a target object includes 10 components, each component has 3 configuration files, there are 30 configuration files in total, each configuration file needs to modify an IP address, and when an existing scheme is used for manual deployment, 30 files need to be found and modified for 30 times, whereas when the scheme provided by the embodiment of the present invention is used, 30 configuration files need not to be modified only once, and after the IP address needing to be modified is marked to form a configuration file template, the obtained actual IP address is modified into a marked modification item, so that the target configuration file can be modified quickly and accurately to form a target configuration file.
The configuration file generation method provided by the embodiment of the invention acquires the target configuration information according to the target object, and calls the configuration file template of the target object, wherein the configuration file template comprises the modification item needing to be modified in the pre-marked current configuration information, and finally, the modification item is modified into the target configuration information, so that the target configuration file of the target object is generated. By adopting the technical scheme, the aim of quickly and accurately generating the target configuration file corresponding to the target object can be fulfilled, and in the process of generating the target configuration file, because the target configuration information is accurately generated according to the target object, compared with the prior art, manual modification on a plurality of items of contents of the corresponding configuration file one by one according to the difference of the site environment and the server is not needed, so that human errors can be reduced, a large amount of time is saved, and the technical effect of quickly and accurately generating the target configuration file is achieved.
Example two
The embodiment of the present invention is further optimized on the basis of the above embodiment, and before the configuration file template of the target object is called, the embodiment of the present invention further includes: determining the current configuration information according to the initial configuration file of the target object; and marking the modification items needing to be modified in the current configuration information by using a preset mark language, and generating a configuration file template of the target object. The method has the advantages that the configuration file template of the target object is generated by marking the current configuration information needing to be modified, so that the corresponding modification operation can be conveniently carried out on the current configuration information subsequently, and the method is convenient and quick.
Further, the step of modifying the modification item into the target configuration information is also optimized, and includes: and calling a preset template engine to read the target configuration information and modifying the modification item into the target configuration information, wherein the preset template engine is a Freemarker template engine. The advantage of this arrangement is that the preset template engine can perform corresponding recognition and modification operations on the preset markup language.
Further, the method further comprises: and saving the target configuration file into a result directory, wherein the target configuration file saved in the result directory is directly applied to the target object. The advantage of this arrangement is that the target configuration file stored in the result directory can be directly applied or copied without performing a secondary modification operation.
As shown in fig. 2, fig. 2 is a schematic flow chart of another configuration file generation method according to an embodiment of the present invention, and specifically, the method includes the following steps:
s210, acquiring target configuration information of the target object.
S220, determining the current configuration information according to the initial configuration file of the target object.
The initial configuration file represents the corresponding configuration file configured by the developer according to the development environment at the time in the development stage. Accordingly, the current configuration information represents the configuration information of the environment in which the initial configuration file is located. For example, the IP address of the initial server, the corresponding configuration parameters of the environment where the open source component and the application software are located, and the like.
It should be noted that the current configuration information included in the initial configuration file in the development stage of the developer may be a corresponding configuration parameter of the environment in the development stage, so that the environment in the development stage can perform corresponding debugging work, and it is clear whether the current scheme is perfect; furthermore, after the environment in the development stage is debugged, the current configuration information can be deleted before the deployment according to the actual environment, so that the content contained in the current configuration information is empty, and the corresponding mark modification operation can be performed on the current configuration information subsequently. Whether specific content is included in the specific current configuration information is not limited herein.
And S230, marking the modification items needing to be modified in the current configuration information by using a preset mark language, and generating a configuration file template of the target object.
When the preset markup language is used for marking the modification items needing to be modified in the current configuration information, the preset markup language corresponds to the template engine for identifying the template one by one, namely the modification items marked by the preset markup language can be identified by the template engine, so that the purpose of accurately modifying the marked modification items can be achieved in the follow-up process.
The generated profile template of the target object is composed of a modification item that needs to be modified in the current configuration information marked by the preset markup language and a content that does not need to be modified and is not marked by the preset markup language.
An alternative embodiment, after generating the profile template for the target object, further comprises: deleting the current configuration information in the modified item.
And deleting the current configuration information in the modification item, which indicates that the current configuration information does not conform to the configuration information required by the server, the open source component and the application software corresponding to the actual environment of the target object, so that the current configuration information in the configuration file template of the target object can be deleted, and the current configuration information in the configuration file template is null.
Accordingly, the modification item is modified into the target configuration information, and the modification item comprises the following steps: and filling the target configuration information into the modification item in the configuration file template of the target object.
Because the current configuration information in the configuration file template is empty, that is, the modified item in the configuration file template of the target object is empty, the target configuration information can be directly filled into the modified item in the configuration file template, thereby generating the target configuration file of the target object.
In another alternative embodiment, the current configuration information in the modification item is replaced with the target configuration information in the profile template of the target object.
When the target object is modified or updated, the modification item to be modified in the pre-marked current configuration information can be directly replaced, so that the target configuration file of the target object is generated.
S240, calling a preset template engine to read the target configuration information and changing the modification item into the target configuration information.
The preset template engine identifies the modification item marked by the preset mark-up language, and after the content marked in advance is read, the server can automatically modify the modification item into the target configuration information.
Preferably, the preset template engine is a FreeMarker template engine, and when a modification item to be modified in the current configuration information of the preset markup language tag is used, the FreeMarker template engine may identify content corresponding to the preset markup language tag.
It should be noted that, when a modification item to be modified in the current configuration information is marked, only one marking is needed, for example, the modification item to be modified may be marked in a form of a preset language mark character in the development stage, for example, in a form of $ { } character, where { } may write a content to be modified, so as to make a configuration file template. When the subsequent preset template engine identifies the $ { } character, the modification operation needs to be explicitly carried out on the content in { }. The specific form of the modification item using the mark character is not limited herein, subject to the actual requirements of the developer.
And S250, generating a target configuration file of the target object.
And when the modification item is modified into the target configuration information in a replacement or filling mode, generating a target configuration file of the target object. The target configuration file may generate files in various forms according to actual requirements of developers, such as a property file (properties), a Text file (Text, txt), an eXtensible Markup Language file (xml), a hypertext Markup Language file (HTML), and the like, which are not limited herein.
By using the configuration file generation method provided by the embodiment of the invention, the target configuration file can be quickly and accurately generated, manual modification of a plurality of contents of the corresponding configuration file according to the difference of the site environment and the server is not needed, manual errors are avoided, the installation and deployment time is saved, and compared with the prior art, the time is saved by about 50% -80%.
And S260, storing the target configuration file into a result directory.
Further, the generated target configuration file can be stored in the result directory, wherein the target configuration file stored in the result directory is directly applied to the target object, so that the advantage of the setting is that the target configuration file is the configuration file which is modified after the open source component or the application software is deployed, and the target configuration file can be directly copied or applied to the corresponding address without secondary modification after being generated so as to realize the corresponding function.
The configuration file generation method provided by the embodiment of the invention comprises the steps of firstly obtaining target configuration information of a target object, extracting each component contained in an initial configuration file and the content of an application which does not need to be modified, analyzing a modification item needed by the configuration file, marking by using a template marking language to form a configuration file template, finally reading a formulated installation deployment scheme configuration file by a tool program, and modifying the marked modification item in the configuration file template to replace or fill the target configuration file into the configuration file template, thereby generating the target configuration file. By adopting the technical scheme, a uniform configuration item entry can be provided for the configuration file, the target object can be manually written at one time according to the target object installed and deployed, and the entry is uniform, repeated, clear and accurate. According to the installation and deployment scheme, the configuration files of all the components and the applications are generated quickly, and the generation time is not more than 5 seconds. And the target configuration file is accurately generated on a plurality of components and application configuration files according to the installation and deployment scheme without human errors. Furthermore, a large amount of time for manually modifying the configuration files is saved, the manual error condition is avoided, and the installation, deployment and debugging time is saved.
EXAMPLE III
Fig. 3 is a block diagram of a configuration file generating apparatus according to an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a computer device such as a server, and may generate a target configuration file corresponding to a target object by executing a configuration file generating method, so as to perform corresponding deployment work on the target object. As shown in fig. 3, the apparatus includes: a target configuration information obtaining module 31, a configuration file template calling module 32 and a modification item modifying module 33, wherein:
and a target configuration information obtaining module 31, configured to obtain target configuration information of the target object.
A configuration file template retrieving module 32, configured to retrieve a configuration file template of the target object, where the configuration file template includes modification items that need to be modified in the pre-marked current configuration information.
A modification item modification module 33, configured to modify the modification item into the target configuration information, so as to generate a target configuration file of the target object.
The configuration file generation device provided in the embodiment of the present invention obtains the target configuration information according to the target object, and calls the configuration file template of the target object, wherein the configuration file template includes a modification item to be modified in the pre-marked current configuration information, and finally changes the modification item into the target configuration information, thereby generating the target configuration file of the target object. By adopting the technical scheme, the aim of quickly and accurately generating the target configuration file corresponding to the target object can be fulfilled, and in the process of generating the target configuration file, because the target configuration information is accurately generated according to the target object, compared with the prior art, manual modification on a plurality of items of contents of the corresponding configuration file one by one according to the difference of the site environment and the server is not needed, so that human errors can be reduced, a large amount of time is saved, and the technical effect of quickly and accurately generating the target configuration file is achieved.
Optionally, the apparatus further comprises: the device comprises a current configuration information determining module and a configuration file template generating module, wherein:
and the current configuration information determining module is used for determining the current configuration information according to the initial configuration file of the target object.
And the configuration file template generating module is used for marking the modification items needing to be modified in the current configuration information by using a preset mark language and generating the configuration file template of the target object.
Optionally, the apparatus further comprises: and the current configuration information deleting unit is used for deleting the current configuration information in the modification item.
Accordingly, the modification item modification module 33 includes: and the target configuration information filling unit is used for filling the target configuration information into the modification items in the configuration file template of the target object.
Optionally, the modification item modification module 33 further includes: and the target configuration information filling unit is used for replacing the current configuration information in the modification items with the target configuration information in the configuration file template of the target object.
Optionally, the modification item modification module 33 is further configured to invoke a preset template engine to read the target configuration information and modify the modification item to the target configuration information, where the preset template engine is a FreeMarker template engine.
Optionally, the apparatus further comprises: and the target configuration file storage module is used for storing the target configuration file into a result directory, wherein the target configuration file stored in the result directory is directly applied to the target object.
Optionally, the target object is a scheme to be deployed or a deployed scheme to be updated.
The configuration file generation device provided by the embodiment of the invention can execute the configuration file generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method.
Example four
The embodiment of the invention provides computer equipment, and the configuration file generation device provided by the embodiment of the invention can be integrated in the computer equipment. Fig. 4 is a block diagram of a computer device according to an embodiment of the present invention. The computer device 400 may include: a memory 401, a processor 402 and a computer program stored on the memory 401 and executable on the processor, wherein the processor 402 implements the configuration file generating method according to the embodiment of the present invention when executing the computer program.
The computer device provided by the embodiment of the invention can execute the configuration file generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method.
EXAMPLE five
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used in a method for profile generation, the method including:
acquiring target configuration information of a target object;
calling a configuration file template of the target object, wherein the configuration file template comprises modification items needing to be modified in the pre-marked current configuration information;
and modifying the modification item into the target configuration information to generate a target configuration file of the target object.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided in the embodiments of the present invention is not limited to the above-described configuration file generation operation, and may also perform related operations in the configuration file generation method provided in any embodiment of the present invention.
The configuration file generation device, the equipment and the storage medium provided in the above embodiments can execute the configuration file generation method provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to a configuration file generation method provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for generating a configuration file, the method comprising:
acquiring target configuration information of a target object;
calling a configuration file template of the target object, wherein the configuration file template comprises modification items needing to be modified in the pre-marked current configuration information;
and modifying the modification item into the target configuration information to generate a target configuration file of the target object.
2. The method of claim 1, prior to invoking the profile template for the target object, further comprising:
determining the current configuration information according to the initial configuration file of the target object;
and marking the modification items needing to be modified in the current configuration information by using a preset mark language, and generating a configuration file template of the target object.
3. The method of claim 2, after generating the profile template for the target object, further comprising:
deleting the current configuration information in the modification item;
correspondingly, the modifying the modification item into the target configuration information includes:
and filling the target configuration information into the modification item in the configuration file template of the target object.
4. The method according to claim 2, wherein the modifying the modification item into the target configuration information comprises:
and replacing the current configuration information in the modification item with the target configuration information in the configuration file template of the target object.
5. The method of claim 1, wherein the modifying the modification item into the target configuration information comprises:
and calling a preset template engine to read the target configuration information and modifying the modification item into the target configuration information, wherein the preset template engine is a Freemarker template engine.
6. The method of claim 1, further comprising:
and saving the target configuration file into a result directory, wherein the target configuration file saved in the result directory is directly applied to the target object.
7. The method according to claim 1, wherein the target object is a to-be-deployed solution or a deployed to-be-updated solution.
8. An apparatus for generating a configuration file, the apparatus comprising:
the target configuration information acquisition module is used for acquiring target configuration information of a target object;
the configuration file template calling module is used for calling a configuration file template of the target object, and the configuration file template comprises modification items needing to be modified in the pre-marked current configuration information;
and the modification item modification module is used for modifying the modification item into the target configuration information so as to generate a target configuration file of the target object.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202111047488.XA 2021-09-07 2021-09-07 Configuration file generation method, device, equipment and medium Pending CN113721973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111047488.XA CN113721973A (en) 2021-09-07 2021-09-07 Configuration file generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111047488.XA CN113721973A (en) 2021-09-07 2021-09-07 Configuration file generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113721973A true CN113721973A (en) 2021-11-30

Family

ID=78682401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111047488.XA Pending CN113721973A (en) 2021-09-07 2021-09-07 Configuration file generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113721973A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775163A (en) * 2023-08-22 2023-09-19 深圳富联富桂精密工业有限公司 Configuration file acquisition method and device, electronic equipment and storage medium
CN117519781A (en) * 2024-01-04 2024-02-06 上海柯林布瑞信息技术有限公司 Script-based project configuration file generation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217029A (en) * 2014-09-26 2014-12-17 北京国双科技有限公司 Configuration file modification method and configuration file modification device
CN109669914A (en) * 2018-11-15 2019-04-23 深圳壹账通智能科技有限公司 Item file storage method, device, equipment and computer readable storage medium
CN109766121A (en) * 2018-12-20 2019-05-17 平安信托有限责任公司 Environment profile generation method, device, computer equipment and storage medium
CN112671566A (en) * 2020-12-16 2021-04-16 平安普惠企业管理有限公司 Data processing method and device, computer equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217029A (en) * 2014-09-26 2014-12-17 北京国双科技有限公司 Configuration file modification method and configuration file modification device
CN109669914A (en) * 2018-11-15 2019-04-23 深圳壹账通智能科技有限公司 Item file storage method, device, equipment and computer readable storage medium
CN109766121A (en) * 2018-12-20 2019-05-17 平安信托有限责任公司 Environment profile generation method, device, computer equipment and storage medium
CN112671566A (en) * 2020-12-16 2021-04-16 平安普惠企业管理有限公司 Data processing method and device, computer equipment and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775163A (en) * 2023-08-22 2023-09-19 深圳富联富桂精密工业有限公司 Configuration file acquisition method and device, electronic equipment and storage medium
CN116775163B (en) * 2023-08-22 2024-02-02 深圳富联富桂精密工业有限公司 Configuration file acquisition method and device, electronic equipment and storage medium
CN117519781A (en) * 2024-01-04 2024-02-06 上海柯林布瑞信息技术有限公司 Script-based project configuration file generation method and device
CN117519781B (en) * 2024-01-04 2024-03-29 上海柯林布瑞信息技术有限公司 Script-based project configuration file generation method and device

Similar Documents

Publication Publication Date Title
US9342273B1 (en) Automatic communications graphing for a source application
US8954930B2 (en) System and method for reducing test effort by object risk analysis
CN111679965A (en) Automatic testing method and device, computer equipment and storage medium
US8321856B2 (en) Supplying software updates synchronously
CN108319460B (en) Method and device for generating application program installation package, electronic equipment and storage medium
US20080276221A1 (en) Method and apparatus for relations planning and validation
US9652220B2 (en) Zero down-time deployment of new application versions
US11113050B2 (en) Application architecture generation
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
CN113721973A (en) Configuration file generation method, device, equipment and medium
US20070234328A1 (en) File handling for test environments
EP3447635A1 (en) Application architecture generation
US20110197178A1 (en) Architecture, system, and method for providing hover help support for c++ application source code
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN110825395B (en) Multi-plug-in layered deployment system, device and medium
US9552282B2 (en) Module interrogation
CN112231379A (en) API (application program interface) auditing method, device, equipment and storage medium based on micro-service architecture
CN111158730A (en) System updating method and device, electronic equipment and readable storage medium
EP3929727A1 (en) Bytecode transformations using virtual artifacts
US11595493B2 (en) System and method for namespace masking in an integration flow
EP1710698A2 (en) Generic software requirements analyser
CN115794214A (en) Application module metadata management method, device, storage medium and device
CN111722881B (en) Resource expansion method, system and device of container cloud platform
CN112363700A (en) Cooperative creation method and device of intelligent contract, computer equipment and storage medium
CN111611173A (en) System and method applied to micro-service engineering interface document detection

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