Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

34 results about "Dependency injection" patented technology

In software engineering, dependency injection is a technique whereby one object supplies the dependencies of another object. A "dependency" is an object that can be used, for example as a service. Instead of a client specifying which service it will use, something tells the client what service to use. The "injection" refers to the passing of a dependency (a service) into the object (a client) that would use it. The service is made part of the client's state. Passing the service to the client, rather than allowing a client to build or find the service, is the fundamental requirement of the pattern.

Fine-grained state response system and method between React components based on Proxy and dependency injection and application of fine-grained state response system and method

ActiveCN120407051AVersion controlExecution paradigmsPathPingDependency injection
The invention provides a React component fine-grained state response system and method based on Proxy and dependency injection and application of the React component fine-grained state response system and method, and relates to the field of computer front-end development. The system comprises a centralized observable state storage module for storing a global sharing state, a dependency automatic tracking and registering module integrated in a set interceptor of Proxy, a state change accurate notification and target update triggering module integrated in a set interceptor, and a component dependency injection and connection module. The system is based on Proxy automatic dependence tracking, and can be accurate to the specific attribute path level of a state object. Only when the minimum state unit which the component actually depends on changes, the component can be rendered again, unnecessary DOM operation is reduced to the maximum extent, and the performance in a frequent updating scene is improved.
Owner:JIANGSU OPEN UNIVERSITY (THE CITY VOCATIONAL COLLEGE OF JIANGSU)

Modularized system dynamic deployment method and system based on lightweight architecture

The invention provides a modular system dynamic deployment method and system based on a lightweight architecture. The method comprises the following steps: configuring the system into a plurality of independent functional modules according to a service boundary; setting a uniform configuration file for defining a target deployment mode of the system; dynamically configuring a parameter group according to a specified target deployment mode in the configuration file; a standardized communication interface is defined for each function module, and service calling is carried out among the function modules in a dependency injection mode based on the configuration parameter set; and according to the configuration parameter group, when the system is started or operated, dynamic adaptation of a communication mechanism between the function modules is realized, so that dynamic deployment switching of the system between a single architecture and a distributed architecture is completed. According to the method, the system can be flexibly switched between the single architecture and the distributed architecture according to actual use requirements, the deployment form conversion can be completed only by modifying configuration, source codes do not need to be modified, and the development and deployment complexity of the modular system is effectively reduced.
Owner:JIANGXI TONGRUI INFORMATION TECH CO LTD

Script dependency injection method and device

PendingCN120295628ACode compilationDependency injectionSoftware engineering
The invention discloses a script dependency injection method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: analyzing an initial script source code by utilizing an automatic assembly script engine, and obtaining a target service object name on which a script depends when the script is executed; based on the name of the target service object, acquiring the target service object by utilizing an automatic assembly script engine; injecting the target service object to obtain a script; and in response to injection completion, executing the script. According to the implementation mode, the dependent injection of the script is realized, the script code becomes simple, the script development process is simplified, and the online speed requirement of the service is met.
Owner:BEIJING JINGDONG TUOXIAN TECH CO LTD

Module dynamic assembly and life cycle management system based on dependency injection strategy

The invention relates to the technical field of electric digital data processing, and discloses a module dynamic assembly and life cycle management system based on a dependency injection strategy, which comprises a data interaction module, a logic assembly unit and a dependency injection center, wherein the data interaction module obtains an interaction load data sequence and a logic trigger signal of the operation state of a controlled physical object; the logic assembly unit determines a physical elastic characteristic factor according to the interaction load data sequence, injects a phase hedging item in a characteristic packet weight switching process, and generates a dynamic weight adjustment instruction; the dependency injection center reconstructs the weight proportion of the new and old feature packets according to the dynamic weight adjustment instruction, and after the physical elasticity feature factor reaches a preset steady state judgment threshold value, the state fingerprint inherits logic and destroys an old instance. The decoupling problem of a control logic and a physical deformation field is solved, data breakpoints at the instant of switching are eliminated, and stable operation of the system is maintained.
Owner:HANGZHOU YONGCHUANG TECH GRP CO LTD

Code execution method and apparatus, device, medium, product

PendingCN122450544ACoding blockDependency injection
The method comprises: obtaining a target code block to be called by a current coroutine and at least one first dependent object relied on by the target code block; storing the at least one first dependent object in a local storage space of the current coroutine; and calling and executing the target code block under the local storage space by using the current coroutine, so as to obtain the at least one first dependent object from the local storage space in the process of calling the target code block. In this way, the dependence on convention and configuration can be reduced, the strong coupling with a specific backend framework is not required, a more intuitive and flexible dependence injection mode is provided, the use of reflection and proxy mechanisms is reduced, and the performance overhead in the code execution process is reduced.
Owner:MOORE THREADS TECH CO LTD

Method, apparatus, device, and medium for modifying a bytecode

The disclosure provides a method, apparatus, device, and medium for modifying a bytecode. The detailed description of the method includes: searching for a bytecode to be tested based on a predetermined annotation and determining a depended object category and a depending object category for dependency injection therefrom; and generating a supplementary bytecode based on the depended object category, inserting the supplementary bytecode into a corresponding part of the depending object category in the bytecode to be tested to obtain a target bytecode. With this method, static dependency injection of code can be implemented in the compilation phase with only a few source code modifications, especially without the need to write a large amount of template code, and the success of the code after dependency injection is guaranteed in the software runtime phase.
Owner:LEMON INC(GB)

Zero code integration risk control method and system based on SpringBoot starter dependency injection

PendingCN121098639ASecuring communicationRisk ControlDependency injection
The invention discloses a zero code integration risk control method and system based on SpringBoot starter dependency injection. The method comprises the following steps: configuring a rule set in a risk control server and pushing the rule set to a configuration management center; establishing and maintaining a dynamic mapping relationship between the business interface URI and the risk control rule set in the configuration management center; the business system is integrated with a risk control client component, and the component is automatically loaded and initialized when the business system is started, and obtains and caches the dynamic mapping relation from the configuration management center; the method comprises the following steps: intercepting a service request through a built-in interceptor before processing the service request, automatically querying a dynamic mapping relationship in a local cache, automatically initiating a risk verification request to a risk control server if a current service request interface exists in the mapping relationship, and determining whether to release the service request according to a returned result. According to the method and the device, the risk control capability and the business system are decoupled, and the change and expansion of the risk control rule can be completed without modifying codes again by the business system.
Owner:福建博思数字科技有限公司

Asynchronous programming implementation method and device, equipment and storage medium

PendingCN120179258AExecution paradigmsCode compilationProgramming languageDependency injection
The invention discloses an asynchronous programming implementation method and device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: creating an asynchronous task node in an asynchronous programming environment, wherein the asynchronous task node is used for realizing an asynchronous task; a dependency injection object is added in the asynchronous task node, the dependency injection object is used for controlling implementation of the asynchronous task in a mode of injecting a dependency item, and the dependency item of the dependency injection object is a promise object; and creating an external interface of the dependency injection object, wherein the external interface is used for acquiring the dependency injection object to control the asynchronous task. According to the method, the promise object serves as the dependency item to be added to the dependency injection object in the asynchronous task node, so that the structure of the asynchronous code is clearer and easier to understand, compiling of the asynchronous code can be simplified when huge asynchronous logic is achieved, and readability and maintainability of the asynchronous code are enhanced.
Owner:GUANGZHOU KUGOU COMP TECH CO LTD

Method, apparatus and device for implementing dependency injection based on hilt

PendingUS20250045030A1Software designProgram controlThird partyDependency injection
The present application discloses a method for implementing dependency injection based on Hilt, for third-party components that require dependency injection, i.e., target components. After obtaining the target component, a generator corresponding to the target component is generated, and a parent class corresponding to the target component is generated with the generator, to declare a dependent object in the parent class. At the same time, an injection container and injection code corresponding to the target component are created, the target component and the dependency provider are bridged based on the injection container, and the instance of the dependency object provided by the dependency provider is assigned to the target component based on the injection code, so that when the target component is executed, the instance of the dependent object is assigned to the target component with the injection container and injection code. Finally, the target component is controlled to inherit the parent class, so that the target component inherits the dependency injection capability of the parent class, and completes the configuration of the target component to implement dependency injection, so that the target component can obtain instances of dependent objects and implement dependency injection.
Owner:DOUYIN VISION CO LTD

Bytecode modification method and device, equipment and medium

PendingCN119271204AError detection/correctionCode compilationDependency injectionStencil code
The embodiment of the invention provides a byte code modification method and device, equipment and a medium. A specific embodiment of the method comprises the following steps: searching a byte code to be tested according to a predetermined annotation, and determining a depended object category and a dependent object category for dependent injection from the byte code to be tested; and generating a supplementary byte code according to the dependent object type, and inserting the supplementary byte code into a part corresponding to the dependent object type in the byte code to be detected to obtain a target byte code. By means of the method, under the condition that only a small number of source codes are used for modification and particularly a large number of template codes do not need to be written, static dependency injection of the codes can be achieved in the compiling stage, and it is guaranteed that the codes subjected to dependency injection run successfully in the software running stage.
Owner:FACE CUTE CO LTD

Service processing method and apparatus

PCT designated stage expiredWO2025040123A1Software designDependency injectionSoftware engineering
Provided in the embodiments of the present application is a service processing method. The service processing method comprises: creating a target coroutine scope object; creating in a dependency injection framework a target dependency injection scope object corresponding to the target coroutine scope object; on the basis of the target coroutine scope object and the target dependency injection scope object, creating a target service unit; and operating the target service unit under the target coroutine scope object so as to manage the target service unit. The technical solution of the embodiments of the present application can create the target service unit in the target dependency injection scope object, thus effectively reducing the code quantity, and improving development efficiency. The target service unit is correspondingly operated under the target coroutine scope object, and therefore, by means of the target coroutine scope, the self-operation of a service logic based on a corresponding life cycle can be achieved.
Owner:SHANGHAI HODE INFORMATION TECH CO LTD

Service architecture method and device for multi-scene application

The embodiment of the invention relates to a service architecture method and device for a multi-scene application. The method comprises the following steps: setting a project directory for the multi-scene application; setting a plurality of shared module directories and a plurality of application customization directories under the directory; each shared module directory stores a module service program of a class of basic services; each application customization directory stores a container program, a context program and an application program customized by a class of scenes; based on an InversifyJS container, performing dependency injection management on all the module service programs of the shared module directory; based on the container program, the context program and the application program, customizing an independent dependency injection container, a scene context and a scene front-end application for each scene; and decoupling the front-end UI and the back-end business logic based on the Zustand state management library. Through the method, the code reuse rate can be improved, the development cost is saved, and the flexibility of application expansion is improved.
Owner:BEIJING DP TECH CO LTD

Dynamic plug-in loading method and system

PendingCN121807400AProgram loading/initiatingTransmissionPathPingDependency injection
The invention discloses a dynamic plug-in loading method and system, and the method comprises the steps: S1, reading and analyzing a predefined plug-in description file when a main program is started or runs; s2, dynamically positioning and loading a corresponding plug-in dynamic link library according to specified path information in the plug-in description file; s3, initializing a plug-in realized in the plug-in dynamic link library by utilizing a dependent injection and modular framework, and integrating the plug-in into a running environment of a main program; s4, analyzing a function item set defined in the plug-in description file, and dynamically generating a corresponding function trigger control in a user interface of the main program according to the definition of the function item set; and S5, executing an instruction associated with the function triggering control in the plug-in description file according to the operation of the user on the function triggering control. According to the method and the device, the predefined interface and the configuration file cooperate, so that decoupling of the plug-in and the main program is realized. The plug-in and the main program can be independently developed, compiled and tested.
Owner:ANHUI XIANGYU INTELLIGENT TECH CO LTD

A method and apparatus for application deployment, electronic device, and storage medium

PendingCN122363715ACode generationDependency injection
The application discloses an application deployment method and device, an electronic device and a computer readable storage medium. The method comprises the following steps: running a target Spring application to a state in which all objects are completed with instantiation and initialization of dependency injection; acquiring a runtime state of all object instances, aspect-oriented programming aspect logic and a dependency relationship between the object instances, and constructing a topology structure for describing the dependency relationship between the object instances; generating application code based on the topology structure, the runtime state of all the object instances and the aspect-oriented programming aspect logic by using a container-free application code generator; compiling the application code to generate a deployment unit which is independent of a Spring container, and deploying the target application based on the deployment unit. The application realizes fast startup, low memory occupation and high environmental adaptability of the Spring application without relying on the Spring container.
Owner:CHINA BANKNOTE PRINTING & MINTING +1

Adaptive customer service configuration method and system based on dependency injection

PendingCN121349520AVersion controlProgram documentationPathPingDependency injection
The invention provides an adaptive customer service configuration method and system based on dependency injection, and relates to the technical field of software application development, and the method comprises the steps: defining a service component interface, customizing annotation identification standard implementation and customer implementation; analyzing the configuration file and obtaining environment parameters required by the customized operation to form a customized operation configuration environment; scanning the specified packet path, identifying an implementation class with a customized annotation identifier, analyzing the annotation of the implementation class, and forming a candidate implementation set based on an analysis result; selecting implementation classes in the candidate implementation set, matching the implementation classes by adopting a screening mechanism, selecting standard implementation according to a rollback strategy when the matched implementation classes are not screened, and determining an adaptive decision result; and injecting the target implementation class in the adaptation decision result into the corresponding service component, recording the whole process of the customer adaptation and dependency injection, and realizing the whole process of customer service configuration. The maintainability, the expandability and the development efficiency of the system are improved.
Owner:DAREWAY SOFTWARE

Component dependency injection method and device, storage medium and electronic equipment

The invention discloses a component dependency injection method and device, a storage medium and electronic equipment, and relates to the technical field of component dependency injection.The method comprises the steps that when a service demand is received, service abstraction is conducted on components of software according to the service demand, and public components are obtained, the common component is composed of a business component for ensuring basic functions of software and a component for providing common service during software operation, calling the general interface through the common component to obtain each piece of dependency information required by dependency injection, performing component dependency item analysis on each piece of dependency information until a dependency item corresponding to each piece of dependency information is obtained, and performing component dependency item analysis on each piece of dependency information; and when monitoring that the system component calls the interface of the service component, injecting a dependency item corresponding to the dependency information into an instance of the service component through a dependency injection mechanism to complete a dependency injection process of the component.
Owner:SUPCON TECH CO LTD

File processing system and method based on VUE dependent injection

The invention provides a file processing system and method based on VUE dependent injection. The file processing system comprises a file management component, a file injection component and a file transmission component, the file management component is used for storing a plurality of business dependence files; the file transmission component is used for sending a dependent file injection request to the file injection component when it is detected that the target service component triggers the file injection rule, and the dependent file injection request comprises a dependent file matching rule; the file injection component is used for acquiring a plurality of service dependent files from the file management component, determining a target dependent file from the plurality of service dependent files based on a dependent file matching rule included in the dependent file injection request, and sending the target dependent file to the file transmission component; and the file transmission component is also used for transmitting the target dependent file based on the dependent file response identifier corresponding to the target dependent file. Therefore, no coupling exists between the processing components in the file transmission process, and accurate transmission of the target dependent file can be facilitated.
Owner:ZHEJIANG HUIRONG NETWORK TECH CO LTD

Fine-grained state response system, method and application between React components based on Proxy and dependency injection

ActiveCN120407051BVersion controlExecution paradigmsPathPingDependency injection
The present invention provides a fine-grained state response system, method, and application between React components based on Proxy and dependency injection, relating to the field of computer front-end development. The system includes a centralized observable state storage module for storing globally shared state, an automatic dependency tracking and registration module integrated into the Proxy's get interceptor, a precise state change notification and target update triggering module integrated into the set interceptor, and a component dependency injection and connection module. Based on Proxy's automatic dependency tracking, the system is capable of accurate tracking down to the specific property path level of state objects. A component is re-rendered only when the smallest state unit it actually depends on changes, minimizing unnecessary DOM operations and improving performance in frequent update scenarios.
Owner:JIANGSU OPEN UNIVERSITY (THE CITY VOCATIONAL COLLEGE OF JIANGSU)

Modular system dynamic deployment method and system based on lightweight architecture

The application provides a modular system dynamic deployment method and system based on a lightweight architecture, which comprises the following steps: configuring a system into multiple independent functional modules according to a business boundary; setting a unified configuration file for defining a target deployment mode of the system; dynamically configuring parameter groups according to the target deployment mode specified in the configuration file; defining a standardized communication interface for each functional module, and performing service calling between the functional modules through a dependency injection mode based on the configuration parameter groups; and dynamically adapting a communication mechanism between the functional modules at the system startup or running according to the configuration parameter groups, so as to complete the dynamic deployment switching between a monolithic architecture and a distributed architecture. The application can flexibly switch between the monolithic architecture and the distributed architecture according to actual use requirements, and can complete the conversion of the deployment form by modifying the configuration only, without modifying the source code, so that the development and deployment complexity of the modular system is effectively reduced.
Owner:JIANGXI TONGRUI INFORMATION TECH CO LTD

Runtime dependency configuration utility

A method is presented for executing an application having multiple mutually-exclusive possible dependencies associated with an interface. First, a repository of implementations is scanned using a configuration utility to identify a subset of the implementations tagged for usability with the configuration utility. The configuration utility identifies keys within each of the subset of implementations, and filters the implementations by these configuration keys. The configuration utility scans configurations for a match with any of the identified configuration keys, and selects one implementation from among the subset of the implementations for dependency injection based on matching of configurations with the identified configuration keys. The configuration utility then injects a dependency using the selected implementation, and initializes configurations specific to the injected dependency.
Owner:INSIGHT DIRECT USA INC

System and method for automatically generating and importing test data, terminal and medium

ActiveCN120631788AError detection/correctionDependency injectionData acquisition
The invention relates to the field of testing, in particular to an automatic test data generating and importing system and method, a terminal and a medium, the system is packaged in a plug-in mode and integrated into a SpringBoot project in a dependency injection mode, and the system is started in a test or quasi-production environment according to read environment parameters; according to a test purpose, various maintenance selection box elements on the page are selected in a mouse click mode, a data generation mode is marked in a textbox, if preposed data is needed for data entry, a preposed data acquisition mode is configured, each operation step and related element positioning information are recorded, and a workflow process is generated according to the recorded data; and executing a workflow process to generate and import test data. According to the invention, rapid establishment of a demonstration environment is realized, the working efficiency is improved, intelligence and flexibility of data generation are realized, diversified test data requirements under different project scenes are met, and the stability and safety of the system are guaranteed.
Owner:INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD

Module dynamic assembly and life cycle management system based on dependency injection strategy

The application relates to the technical field of electric digital data processing, and discloses a module dynamic assembly and life cycle management system based on a dependency injection strategy, which comprises a data interaction module, a logic assembly unit and a dependency injection center, wherein the data interaction module acquires an interactive load data sequence of a running state of a controlled physical object and a logic trigger signal; the logic assembly unit determines a physical elastic characteristic factor according to the interactive load data sequence, injects a phase hedging item in a characteristic package weight switching process, and generates a dynamic weight adjustment instruction; the dependency injection center reconstructs a new and old characteristic package weight proportion according to the dynamic weight adjustment instruction, adopts state fingerprint inheritance logic after the physical elastic characteristic factor reaches a preset steady state judgment threshold, and destroys an old instance, the application solves the decoupling problem of a control logic and a physical deformation field through real-time coupling of a physical elastic characteristic factor and control weight, eliminates data breakpoints in a switching transient state, and maintains smooth system operation.
Owner:HANGZHOU YONGCHUANG TECH GRP CO LTD

Acquisition system supporting online configuration

The invention discloses an acquisition system supporting online configuration. The acquisition system comprises an event bus, a thread pool, a database connection pool, an equipment instance and an execution unit, loading dependencies required by the system according to the dependency configuration file, wherein the dependencies comprise a dynamic library, global dependencies and device container dependencies; when the system is initialized, loading the dynamic library into the system according to the dynamic library file address provided by the load tag; obtaining a full path name provided by the label according to the app label, searching a corresponding type in a program, instantiating the type by using a dependency injection factory, and sequentially loading equipment instances according to the docks label; after the event is put into the event bus, the event receiver receives the event and distributes the event to the corresponding execution unit according to the name of the event; the system comprises a plurality of execution units, and each execution unit comprises business logic loaded into an independent Domain; each execution unit has the name of a group of executable events, and the event executor can be reloaded during operation.
Owner:JIANGSU TIANHE INFORMATION TECH CO LTD

Data processing pipeline auto-assembly system and method

PendingCN122261630AVersion controlProgram documentationData classDependency injection
The application provides a data processing pipeline automatic assembly system and method. It comprises: an operator discovery module for obtaining registered operators based on a modular dependency injection container in the application initialization stage; a hierarchical metadata generation module for generating operator execution metadata; a pipeline registry module for creating or caching corresponding data processing pipeline instances according to data types; an automatic topology assembly module for building a directed data processing topology; a data access and driving module for obtaining a target data processing pipeline instance from the pipeline registry module according to the input data type and delivering data to the entry buffer node; a topology visualization output module for generating a tree topology description based on the node identification and connection relationship formed by assembly, and outputting node type, operator identification, data type mapping relationship, execution order and execution parameters. The application can reduce process coupling cost, improve pipeline expansion and configuration efficiency, and improve operation and maintenance observability.
Owner:DUAL DOMAIN TIMES (SHANGHAI) COMPUTER TECHNOLOGY CO LTD

Multi-entry point extraction and call graph construction method for SpringWeb framework

The invention provides a multi-entry point extraction and call graph construction method for a SpringWeb framework, which comprises the following steps: firstly, identifying multiple entry points in a Web application, such as a controller, a service class and a REST interface, and ensuring that an analysis tool can fully cover all entry points of the application; secondly, processing dependency injection dynamic characteristics in the Spring framework through a static analysis technology, and analyzing and accurately constructing a dependency relationship to optimize the accuracy of a control flow and a data flow; finally, a complete calling graph is generated, the calling relation of all calling points is displayed, and accurate static inference can be conducted on dynamic behaviors of the SpringWeb application program. According to the method, the problems of dynamic dependency injection characteristics and Web application multi-entry point extraction and call flow analysis in the Spring core technology are solved.
Owner:SOUTHEAST UNIV

Method and device for acquiring generic Bean in Spring Framework framework, equipment and medium

ActiveCN120743286ACode compilationDependency injectionGeneric programming
The invention discloses a method, a device, equipment and a medium for acquiring generic Bean in Spring Framework framework, and relates to the technical field of computers, the method comprises the following steps: acquiring an initial object from a preset container, and storing a generic type of a preset object acquisition method into a preset expected type variable; packaging the preset expected type variable to obtain a packaged object, and verifying whether the generic type of the packaged object is consistent with the generic type of the initial object; if yes, performing forced conversion on the initial object, and returning to the initial object; and if not, performing exception error reporting based on the original type of the initial object. Therefore, generic object acquisition with real type security can be realized in Spring Framework, the function blank of a framework in the aspect of generic dependency injection is filled, and the risk of type conversion errors caused by forced type conversion is thoroughly avoided.
Owner:湖南长银五八消费金融股份有限公司

Dependency injection with auto-serialization in multiple worker system

In some embodiments, a system performs a service using a plurality of compute nodes. A second compute node installs a dependency injection container to manage a dependency graph of dependencies for classes in an application. The dependency injection container is determined from a first compute node in the plurality of compute nodes that manages performing the service with the plurality of compute nodes. The second compute node receives information identifying a node in the dependency graph from the first compute node. The information is received to create a first object that has been created on the first compute node. The second compute node uses the information to determine a first class for the node in the dependency graph and a dependency on a second class and creates the first object of the first class with the dependency on a second object of the second class on the second compute node.
Owner:HULU LLC

A method and related apparatus for maintaining an intelligent agent's environment

PendingCN122633438ADependency injectionOperating system
This application discloses a method and related apparatus for maintaining an intelligent agent environment, relating to the field of artificial intelligence. The method includes: creating an independent intelligent agent thread for the user in response to an intelligent agent initiation command; instantiating a driver layer module and an upper-layer module containing a tool layer module within this thread; injecting lower-layer module instances based on the dependency information of the upper-layer module to form a dependency call chain from the tool layer to the driver layer; during the execution of a large language model task loop, each round of calling the tool layer module obtains a control handle uniquely bound to the thread of the task loop along the dependency call chain, and sends control commands to the physical execution environment based on this control handle. This application, based on thread isolation, dependency injection, and handle binding mechanisms, achieves the reuse of the same execution session across multiple rounds of tool calls, solving the problem of task context breakage.
Owner:广州市公安局网络安全保卫支队

Methods, devices, and media for obtaining generic beans in the Spring Framework

ActiveCN120743286BCode compilationDependency injectionGeneric programming
This application discloses methods, apparatus, devices, and media for obtaining generic beans in the Spring Framework, relating to the field of computer technology. The methods include: obtaining an initial object from a predefined container and storing the generic type of the predefined object acquisition method in a predefined expected type variable; encapsulating the predefined expected type variable to obtain an encapsulated object, and verifying whether the generic type of the encapsulated object is consistent with that of the initial object; if consistent, performing a type cast on the initial object and returning the initial object; if inconsistent, throwing an exception based on the original type of the initial object. This enables truly type-safe acquisition of generic objects in the Spring Framework, filling the functional gap in generic dependency injection within the framework and completely avoiding the risk of type conversion errors caused by forced type casting.
Owner:湖南长银五八消费金融股份有限公司

Angular framework code auditing method, electronic device, storage medium, and program product

The application provides an Angular framework code auditing method, an electronic device, a storage medium and a program product, and relates to the technical field of security. The method divides source code into semantic code units with complete context by using Angular framework syntax features, which can effectively improve the understanding ability of a large language model for framework-specific logic and avoid missing detection of semantics such as decorators and dependency injection by general tools. Meanwhile, based on the dynamic retrieval of a rule knowledge base according to a user-specified auditing dimension label, accurate matching of auditing rules and auditing intentions is achieved, and then accurate auditing of code is performed by a large language model based on a target auditing rule set.
Owner:HUBEI TIANRONGXIN NETWORK SECURITY TECH CO LTD +3