Dependency injection method and dependency injection device based on system running

A dependency injection, the only technology, applied in the direction of program control devices, etc., can solve the problems of dynamic change of injection characteristic instances, low practicability, and inapplicability to business systems, etc., to achieve the effect of dependency injection and improve practicability

Inactive Publication Date: 2012-07-11
卓望数码技术(深圳)有限公司
View PDF1 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] In summary, the inventor found that although the existing Spring dependency injection function is relatively powerful, it cannot dynamically change the injected feature instances when the system is running, and is not suitable for business systems with a large number of business features, and its practicability is low.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dependency injection method and dependency injection device based on system running
  • Dependency injection method and dependency injection device based on system running
  • Dependency injection method and dependency injection device based on system running

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0041] See figure 2 , is a schematic structural diagram of the first embodiment of the system-based dependency injection device of the present invention; the device includes:

[0042] The first obtaining unit 10 is configured to obtain the configuration information of the service characteristics from the service characteristic configuration table according to the service characteristics required for system operation.

[0043] If the system needs to be applied to ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

An embodiment of the invention discloses a dependency injection method, which includes the steps: acquiring configuration information of a business feature from a business feature configuration table according to the business feature required by system running; acquiring configuration information of a corresponding feature instance from a feature instance configuration table according to the configuration information of the business feature and the mapping relation between the default business feature configuration table and the feature instance configuration table; and instancing the business feature according to the acquired configuration information of the feature instance, and returning the instanced feature to a system for running. The embodiment of the invention further discloses a dependency injection device based on system running. By the aid of the method and the device, the injected feature instance can be dynamically changed when the system runs, so that the loose coupling relation between the system (invoker) and the feature instance (implementation class) is guaranteed, and practicality of Spring dependency injection is improved.

Description

technical field [0001] The present invention relates to the technical field of dependency injection, in particular to a system operation-based dependency injection method and device. Background technique [0002] Dependency Injection (Dependency Injection, DI), also known as Inversion of Control (IoC), is an important technology that uses the principles of object-oriented programming to reduce the coupling problem of computer programs. Dependency injection technology is mainly represented by the Spring framework (an open source Java / Java EE full-stack (full-stack) application framework). The Spring framework provides three dependency injection methods: attribute injection, constructor injection and factory method injection. . Spring's dependency injection technology uses XML (Extensible Markup Language, Extensible Markup Language) configuration files or Java annotations for injection configuration. Among them, XML configuration files are used for injection configuration, an...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 宫建涛
Owner 卓望数码技术(深圳)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products