Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Spring framework generic dependency injection method and device, computer equipment and storage medium

A dependency injection and generic technology, applied in the field of artificial intelligence, can solve the problems that dependent objects cannot enter the ready state immediately, do not support generic dependency injection methods, and the constructor is bloated, so as to achieve easy reading, improve operating efficiency, and simplify programs Effect

Pending Publication Date: 2019-09-10
PING AN TECH (SHENZHEN) CO LTD
View PDF4 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the embodiment of the present invention provides a spring framework generic dependency injection method, device, computer equipment, and storage medium to solve the problem in the prior art that the version framework below spring 4.0 does not support the generic dependency injection method, And solve the problem that the injection method supported by the framework of the version below spring 4.0 may easily cause the constructor to be bloated and difficult to read, or the generated dependent object cannot enter the ready state immediately after the construction is completed, or the problem of being too intrusive

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
  • Spring framework generic dependency injection method and device, computer equipment and storage medium
  • Spring framework generic dependency injection method and device, computer equipment and storage medium
  • Spring framework generic dependency injection method and device, computer equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of the invention.

[0038] The appearances of the phrase "an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0039] The embodiment of the present invention provides a spring framework generic dependency injection method, wh...

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

The invention belongs to the technical field of artificial intelligence, and relates to a spring frame generic dependency injection method and device, computer equipment and a storage medium, and themethod comprises the steps: obtaining an operation path of a target bean object needing to be subjected to generic dependency injection after monitoring that a spring container is started; obtaining aclass file according to the operation path, and collecting the class file corresponding to one dependency object to form a class file set; and generating a bean object according to each class file inthe class file set, and injecting the bean object into the attribute of the target bean object to realize generic dependency injection. The scheme provided by the invention can be applied to a springframework without a generic dependency injection function; a class file is obtained from a set path after a spring container is started to realize generic dependency injection; the dependency relationship between the objects can be simplified, the program is more simplified, reading is easy, invasiveness is weak, the generated dependency object can immediately enter a ready state after construction is completed, and the program operation efficiency can be improved.

Description

technical field [0001] Embodiments of the present invention belong to the technical field of artificial intelligence, and in particular relate to a spring framework generic dependency injection method, device, computer equipment, and storage medium. Background technique [0002] For applications based on the spring framework, a series of bean objects need to be generated during the implementation of program functions, and specific functions can be realized by operating these bean objects. [0003] A bean object is an instantiation of a java class. The java class contains a series of methods and attributes. These methods often rely on the methods of other classes to run. Therefore, this dependency relationship will be used in the process of generating the bean object. Through the dependency relationship To refer to the methods and properties of the dependent object, and inject them into the bean object. The existing dependency injection methods mainly include three types: con...

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): G06F8/30G06F8/71
CPCG06F8/31G06F8/71
Inventor 王建华曹佩敬
Owner PING AN TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products