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

    Constructors
    Constructor
    Description
    AiAgentBeanPostProcessor(org.springframework.beans.factory.ObjectProvider<AiOperations> aiOperationsProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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, wait

    Methods 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

      public Object postProcessAfterInitialization(@NonNull Object bean, @NonNull 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.
      Specified by:
      postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
      Parameters:
      bean - original Bean Example
      beanName - Bean name
      Returns:
      Returns the proxy object if a proxy is required, otherwise returns the original Bean