Class AgentPlatformPropertiesLoader

  • All Implemented Interfaces:

    @Configuration()@PropertySource(value = {"classpath:agent-platform.properties", "classpath:agent-application.properties"})@Order(value = -2147483648) 
    public final class AgentPlatformPropertiesLoader
    
                        

    Loads agent platform properties into Spring's Environment for library-wide availability.

    This configuration class uses pure Spring Framework features (@PropertySource, @Order) to ensure compatibility with both Spring Boot and pure Spring applications.

    • @PropertySource: Core Spring Framework feature (since 3.1) - works in any Spring environment

    • @Order(HIGHEST_PRECEDENCE): Ensures properties are loaded before other @Configuration classes

    • No Spring Boot dependencies: Works with Spring WebMVC, WebFlux, standalone contexts

    1. AgentPlatformPropertiesLoader processes first → Properties loaded into Environment
    2. Other @Configuration classes process → Properties available for @ConfigurationProperties binding
    3. @ConfigurationProperties beans created → Automatic property binding occurs
    • agent-platform.properties → Spring Environment → @ConfigurationProperties classes

    • Enables: AnthropicProperties, OpenAiProperties, AgentPlatformProperties, Migration system configs

    After this loader is active:

    • AnthropicProperties: Will bind from embabel.agent.platform.models.anthropic.* (no longer defaults)

    • OpenAiProperties: Will bind from embabel.agent.platform.models.openai.* (no longer defaults)

    • Migration system: Properties will be loaded for conditional bean creation

    • AgentPlatformProperties: Will bind actual values instead of being dormant

    Since:

    1.x

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit init()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AgentPlatformPropertiesLoader

        AgentPlatformPropertiesLoader()
    • Method Detail

      • init

        @PostConstruct() final Unit init()