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 DeprecatedPropertyScanningConfigConfiguration 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
varto ensure consistency with production requirements:@Configuration + @ConfigurationProperties: Requires
varfor CGLIB proxy compatibilityComplex types (List): Need
varfor reliable environment variable bindingScalar types: Use
varto maintain pattern consistency and avoid production issues
This follows the same pattern as
DeprecatedPropertyWarningConfigwhich was validated in production.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDeprecatedPropertyScanningConfig.Companion
-
Field Summary
Fields Modifier and Type Field Description private List<String>includePackagesprivate List<String>excludePackagesprivate List<String>additionalExcludesprivate BooleanautoExcludeJarPackagesprivate IntegermaxScanDepthprivate Booleanenabledpublic final static DeprecatedPropertyScanningConfig.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description DeprecatedPropertyScanningConfig()
-
Method Summary
Modifier and Type Method Description final List<String>getIncludePackages()Base packages to scan for deprecated conditional annotations. final UnitsetIncludePackages(List<String> includePackages)Base packages to scan for deprecated conditional annotations. final List<String>getExcludePackages()Package prefixes to exclude from scanning. final UnitsetExcludePackages(List<String> excludePackages)Package prefixes to exclude from scanning. final List<String>getAdditionalExcludes()Additional user-specific packages to exclude. final UnitsetAdditionalExcludes(List<String> additionalExcludes)Additional user-specific packages to exclude. final BooleangetAutoExcludeJarPackages()Whether to use classpath-based detection to automatically exclude JAR-based packages. final UnitsetAutoExcludeJarPackages(Boolean autoExcludeJarPackages)Whether to use classpath-based detection to automatically exclude JAR-based packages. final IntegergetMaxScanDepth()Maximum depth for package scanning to prevent excessive recursion. final UnitsetMaxScanDepth(Integer maxScanDepth)Maximum depth for package scanning to prevent excessive recursion. final BooleangetEnabled()Whether scanning is enabled. final UnitsetEnabled(Boolean enabled)Whether scanning is enabled. final Unitinit()final List<String>getAllExcludePackages()Gets the complete list of packages to exclude, combining defaults with additional excludes. final BooleanshouldExcludePackage(String packageName)Checks if a package should be excluded from scanning. final BooleanshouldIncludePackage(String packageName)Checks if a package should be included in scanning. -
-
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=falseembabel: 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=falseembabel: 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
trueto 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
trueto activate comprehensive migration detection and warnings.
-
getAllExcludePackages
final List<String> getAllExcludePackages()
Gets the complete list of packages to exclude, combining defaults with additional excludes.
-
shouldExcludePackage
final Boolean shouldExcludePackage(String packageName)
Checks if a package should be excluded from scanning.
-
shouldIncludePackage
final Boolean shouldIncludePackage(String packageName)
Checks if a package should be included in scanning.
-
-
-
-