CN-121979520-A - Back-end low-code development method and related system based on annotation registration custom component
Abstract
The invention belongs to the field of back-end low-code development, and discloses a back-end low-code development method and a related system based on annotation registration custom components. The invention obviously improves the problem that the development efficiency and the flexibility in the running process are difficult to be compatible in the existing component registration mode by introducing a mechanism for annotating and registering the custom component. The invention analyzes and generates the custom component data by utilizing the custom annotation data provided by the platform, realizes a lightweight component definition mode from the source, and avoids the complexity and maintenance burden under the traditional hard coding or XML configuration mode. Through the annotation driving mode, a developer can complete component registration by only marking necessary information on a business logic level, so that repetitive operation is reduced, configuration invasiveness is reduced, and development efficiency is improved.
Inventors
- HAN CHENHUI
- ZHAO XUAN
- WANG TAO
- Qi Zhouteng
- WANG YI
- LIU CONGRUI
Assignees
- 西安西热电站信息技术有限公司
- 西安热工研究院有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260112
Claims (10)
- 1. The back-end low-code development method for registering the custom component based on the annotation is characterized by comprising the following steps: the method comprises the steps of obtaining custom annotation data provided by a platform, and analyzing the custom annotation data to obtain custom assembly data; acquiring business logic data among the custom components according to the custom component data; According to the custom component data, calculating logic data and basic data among the custom components are obtained; loading service logic data, calculation logic data and basic data, and accessing the service logic data, the calculation logic data and the basic data into a database; And carrying out graphical processing on the business logic data, the calculation logic data and the basic data which are accessed into the database, and arranging the business logic data, the calculation logic data and the basic data after the graphical processing to finish low-code development.
- 2. The method of claim 1, wherein custom component data includes BusinessBean data and DataBean data, businessBean data is used to determine business logic data between custom components, dataBean data is used to determine computation logic data and base data between custom components.
- 3. The method of claim 2, wherein BusinessBean data is used on class/interface/enumeration/annotation types, businessBean data includes identifiers, names of business components, groupings of business components, component descriptions, icons that components display on a designer interface, lifecycle of components, ordering of components, and component version numbers.
- 4. The method of claim 2, wherein DataBean data is used on class/interface/enumeration/annotation types, dataBean data includes an identifier, a name of a business component, a grouping of business components, a component description, and a component version number.
- 5. The method for back-end low-code development of annotation-based registration of custom components of claim 1, wherein the custom component data is registered in beanFactory in factory mode when business logic data between the custom components is obtained from the custom component data and computation logic data and base data between the custom components are obtained from the custom component data.
- 6. The method for developing back-end low code of custom components based on annotation registration of claim 1, wherein business logic data between custom components is obtained according to custom component data, and the calculation logic data and basic data between custom components are read by a reflection mechanism when the business logic data between custom components is obtained according to custom component data.
- 7. A back-end low-code development system for registering custom components based on annotations, comprising: the module data acquisition module is used for acquiring the self-defined annotation data provided by the platform, analyzing the self-defined annotation data and obtaining the self-defined module data; the business logic data acquisition module is used for acquiring business logic data among the custom components according to the custom component data; the basic data acquisition module is used for acquiring calculation logic data and basic data among the custom components according to the custom component data; The communication module is used for loading the business logic data, the calculation logic data and the basic data and accessing the business logic data, the calculation logic data and the basic data into the database; The development module is used for carrying out graphic processing on the business logic data, the calculation logic data and the basic data which are accessed into the database, and arranging the business logic data, the calculation logic data and the basic data after the graphic processing to finish low-code development.
- 8. A back-end low-code development system for registering custom components based on annotations, comprising: The background server is used for acquiring the self-defined annotation data provided by the platform, analyzing the self-defined annotation data to obtain self-defined assembly data, acquiring business logic data among the self-defined assemblies according to the self-defined assembly data, and acquiring calculation logic data and basic data among the self-defined assemblies according to the self-defined assembly data; the database server is used for loading the business logic data, the calculation logic data and the basic data and accessing the business logic data, the calculation logic data and the basic data into the database; The low code designer is used for carrying out graphic processing on the business logic data, the calculation logic data and the basic data which are accessed into the database, and arranging the business logic data, the calculation logic data and the basic data after the graphic processing to finish low code development.
- 9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the backend low code development method of the annotation-based registration customization component of any of claims 1 to 6.
- 10. A storage medium having stored thereon a computer program, which when executed by a processor implements the steps of the backend low code development method of an annotation-based registration customization component of any of claims 1 to 6.
Description
Back-end low-code development method and related system based on annotation registration custom component Technical Field The invention belongs to the field of back-end low-code development, and particularly relates to a back-end low-code development method and a related system based on annotation registration custom components. Background Conventional Java applications typically rely on XML configuration files or hard-coded means for registration during component management. When the XML configuration file is adopted, although the separation of the components and the business logic can be realized to a certain extent, the XML file can present the problems of huge volume and complicated level along with the expansion of the system scale, so that the maintenance cost is continuously increased. If a hard coding mode is adopted, the component dependency relationship is directly solidified in the source code, the expansibility and portability are poor, and any modification can cause large-scale code adjustment and regression verification, so that a large burden is brought to system iteration. The above manner not only reduces development efficiency, but also makes it difficult to meet the requirements of modern applications for quick response and flexible adaptation. In order to overcome the above-mentioned drawbacks, a dependent injection method based on annotation driving has appeared in recent years. According to the method, the annotation mark is used in the code, so that automatic injection of the component dependency relationship is realized, and complicated XML configuration is reduced, so that development convenience is improved. However, this approach mainly solves the problem of simplification of dependent injection, and there is still a deficiency to the runtime orchestration of business components. In particular, annotation driving mechanisms often solidify the dependencies of components at compile time, lack the ability to flexibly adjust and combine during operation, and have difficulty in adapting to dynamic requirements in complex business scenarios. With the widespread use of enterprise applications and microservice architecture, dynamic access needs of systems to third party libraries and middleware are becoming more frequent. In this context, if a conventional XML configuration or annotation driving scheme is still adopted, not only is the core code required to be modified invasively, but additional environmental configuration and version compatibility issues may also be brought. Once the differentiated functional modules are required to be combined among different tenants or are realized according to a service policy switching component in the running process, the existing scheme often looks at a great deal of distraction. In summary, the prior art generally has the problem that development efficiency and flexibility in running are difficult to be compatible in terms of component management, the static configuration mode is simple and convenient to control but has insufficient expansibility, and the dynamic expansion scheme is complex to realize and high in maintenance cost. Therefore, a lightweight, low-intrusion business component dynamic orchestration mechanism is needed to meet the technical needs of fast iteration and flexible combination. Disclosure of Invention The invention aims to solve the problem that the existing component registration mode is difficult to consider development efficiency and runtime flexibility, and provides a back-end low-code development method and a related system for registering custom components based on notes. In order to achieve the above purpose, the invention adopts the following technical scheme: In a first aspect, the present invention provides a back-end low-code development method for registering custom components based on annotations, comprising the steps of: the method comprises the steps of obtaining custom annotation data provided by a platform, and analyzing the custom annotation data to obtain custom assembly data; acquiring business logic data among the custom components according to the custom component data; According to the custom component data, calculating logic data and basic data among the custom components are obtained; loading service logic data, calculation logic data and basic data, and accessing the service logic data, the calculation logic data and the basic data into a database; And carrying out graphical processing on the business logic data, the calculation logic data and the basic data which are accessed into the database, and arranging the business logic data, the calculation logic data and the basic data after the graphical processing to finish low-code development. The invention is further improved in that the custom component data comprises BusinessBean data and DataBean data, businessBean data is used for determining business logic data among the custom components, dataBean data is used for determining calculation logic d