Package com.aispect.engine.spring
Class AiAgentBeanPostProcessor
java.lang.Object
com.aispect.engine.spring.AiAgentBeanPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class AiAgentBeanPostProcessor
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor
Spring BeanPostProcessor extension, used for applications with @AiNode or @AiGraphAgent annotated Bean Automatically create agents.
Note: In order to be able to escape Spring Context-dependent compilation, this is just a simplified implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionAiAgentBeanPostProcessor(org.springframework.beans.factory.ObjectProvider<AiOperations> aiOperationsProvider) -
Method Summary
Modifier and TypeMethodDescriptionpostProcessAfterInitialization(Object bean, String beanName) exist Bean Post-processing is performed after initialization. scanning Bean For all methods in , check whether it contains @AiNode、@AiGraphAgent or @AiUnitAgent annotation. If included, attempts to create a proxy object for its first interface, thus injecting AI Orchestration capabilities.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitialization
-
Constructor Details
-
AiAgentBeanPostProcessor
public AiAgentBeanPostProcessor(org.springframework.beans.factory.ObjectProvider<AiOperations> aiOperationsProvider)
-
-
Method Details
-
postProcessAfterInitialization
exist Bean Post-processing is performed after initialization. scanning Bean For all methods in , check whether it contains @AiNode、@AiGraphAgent or @AiUnitAgent annotation. If included, attempts to create a proxy object for its first interface, thus injecting AI Orchestration capabilities.- Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Parameters:
bean- original Bean ExamplebeanName- Bean name- Returns:
- Returns the proxy object if a proxy is required, otherwise returns the original Bean
-