Class DeprecatedPropertyScanningConfig

  • All Implemented Interfaces:

    @Configuration()@ConfigurationProperties(value = "embabel.agent.platform.migration.scanning")@ConditionalOnProperty(name = {"embabel.agent.platform.migration.scanning.enabled"}, havingValue = "true", matchIfMissing = false) 
    public final class DeprecatedPropertyScanningConfig
    
                        

    Configuration for conditional property scanning during migration.

    Controls which packages are scanned for deprecated property in @ConditionalOnProperty annotations. Uses a flexible approach with configurable include/exclude patterns to handle diverse project structures and dependencies.

    All properties use var to ensure consistency with production requirements:

    • @Configuration + @ConfigurationProperties: Requires var for CGLIB proxy compatibility

    • Complex types (List): Need var for reliable environment variable binding

    • Scalar types: Use var to maintain pattern consistency and avoid production issues

    This follows the same pattern as DeprecatedPropertyWarningConfig which was validated in production.

    • Constructor Detail

      • DeprecatedPropertyScanningConfig

        DeprecatedPropertyScanningConfig()
    • Method Detail

      • getIncludePackages

         final List<String> getIncludePackages()

        Base packages to scan for deprecated conditional annotations. Defaults to actual Embabel packages while excluding framework internals.

        Current packages:

        • com.embabel.agent: Main agent framework code

        • com.embabel.agent.shell: Shell module (in embabel-agent-shell artifact)

        Future packages (when they exist):

        • com.embabel.plugin: Plugin system

        • com.embabel.extension: Extension system

        # Override to scan custom packages
        embabel.agent.platform.migration.scanning.include-packages[0]=com.embabel.agent
        embabel.agent.platform.migration.scanning.include-packages[1]=com.mycorp.custom
        embabel.agent.platform.migration.scanning.include-packages[2]=com.thirdparty.integration
        
        # Add additional excludes
        embabel.agent.platform.migration.scanning.additional-excludes[0]=com.noisy.framework
        embabel.agent.platform.migration.scanning.additional-excludes[1]=com.slow.scanner
        
        # Disable auto JAR exclusion for comprehensive scanning
        embabel.agent.platform.migration.scanning.auto-exclude-jar-packages=false
        embabel:
          agent:
            platform:
              migration:
                scanning:
                  include-packages:
                    - com.embabel.agent
                    - com.mycorp.custom
                    - com.thirdparty.integration
                  additional-excludes:
                    - com.noisy.framework
                    - com.slow.scanner
                  auto-exclude-jar-packages: false
        # Include packages (comma-separated)
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_INCLUDE_PACKAGES=com.embabel.agent,com.mycorp.custom
        
        # Additional excludes (comma-separated)
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_ADDITIONAL_EXCLUDES=com.noisy.framework,com.slow.scanner
        
        # Disable auto JAR exclusion
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_AUTO_EXCLUDE_JAR_PACKAGES=false
        
        # Disable scanning entirely in production
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_ENABLED=false
      • setIncludePackages

         final Unit setIncludePackages(List<String> includePackages)

        Base packages to scan for deprecated conditional annotations. Defaults to actual Embabel packages while excluding framework internals.

        Current packages:

        • com.embabel.agent: Main agent framework code

        • com.embabel.agent.shell: Shell module (in embabel-agent-shell artifact)

        Future packages (when they exist):

        • com.embabel.plugin: Plugin system

        • com.embabel.extension: Extension system

        # Override to scan custom packages
        embabel.agent.platform.migration.scanning.include-packages[0]=com.embabel.agent
        embabel.agent.platform.migration.scanning.include-packages[1]=com.mycorp.custom
        embabel.agent.platform.migration.scanning.include-packages[2]=com.thirdparty.integration
        
        # Add additional excludes
        embabel.agent.platform.migration.scanning.additional-excludes[0]=com.noisy.framework
        embabel.agent.platform.migration.scanning.additional-excludes[1]=com.slow.scanner
        
        # Disable auto JAR exclusion for comprehensive scanning
        embabel.agent.platform.migration.scanning.auto-exclude-jar-packages=false
        embabel:
          agent:
            platform:
              migration:
                scanning:
                  include-packages:
                    - com.embabel.agent
                    - com.mycorp.custom
                    - com.thirdparty.integration
                  additional-excludes:
                    - com.noisy.framework
                    - com.slow.scanner
                  auto-exclude-jar-packages: false
        # Include packages (comma-separated)
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_INCLUDE_PACKAGES=com.embabel.agent,com.mycorp.custom
        
        # Additional excludes (comma-separated)
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_ADDITIONAL_EXCLUDES=com.noisy.framework,com.slow.scanner
        
        # Disable auto JAR exclusion
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_AUTO_EXCLUDE_JAR_PACKAGES=false
        
        # Disable scanning entirely in production
        export EMBABEL_AGENT_PLATFORM_MIGRATION_SCANNING_ENABLED=false
      • getExcludePackages

         final List<String> getExcludePackages()

        Package prefixes to exclude from scanning. Uses a comprehensive strategy that excludes common framework and library packages while allowing configuration override for custom environments.

      • setExcludePackages

         final Unit setExcludePackages(List<String> excludePackages)

        Package prefixes to exclude from scanning. Uses a comprehensive strategy that excludes common framework and library packages while allowing configuration override for custom environments.

      • getAdditionalExcludes

         final List<String> getAdditionalExcludes()

        Additional user-specific packages to exclude. Allows runtime customization without modifying the default exclusion list.

      • setAdditionalExcludes

         final Unit setAdditionalExcludes(List<String> additionalExcludes)

        Additional user-specific packages to exclude. Allows runtime customization without modifying the default exclusion list.

      • getAutoExcludeJarPackages

         final Boolean getAutoExcludeJarPackages()

        Whether to use classpath-based detection to automatically exclude JAR-based packages. When enabled, packages from JAR files are automatically excluded from scanning.

      • setAutoExcludeJarPackages

         final Unit setAutoExcludeJarPackages(Boolean autoExcludeJarPackages)

        Whether to use classpath-based detection to automatically exclude JAR-based packages. When enabled, packages from JAR files are automatically excluded from scanning.

      • getMaxScanDepth

         final Integer getMaxScanDepth()

        Maximum depth for package scanning to prevent excessive recursion.

      • setMaxScanDepth

         final Unit setMaxScanDepth(Integer maxScanDepth)

        Maximum depth for package scanning to prevent excessive recursion.

      • getEnabled

         final Boolean getEnabled()

        Whether scanning is enabled. Disabled by default for production safety - migration system is completely dormant. Set to true to activate comprehensive migration detection and warnings.

      • setEnabled

         final Unit setEnabled(Boolean enabled)

        Whether scanning is enabled. Disabled by default for production safety - migration system is completely dormant. Set to true to activate comprehensive migration detection and warnings.

      • init

        @PostConstruct() final Unit init()
      • getAllExcludePackages

         final List<String> getAllExcludePackages()

        Gets the complete list of packages to exclude, combining defaults with additional excludes.