Deprecated Property Warning Config
Configuration for deprecated property warning behavior.
Spring Boot + Kotlin Binding Pattern Analysis
This configuration class uses var for the Boolean property due to production requirements discovered when using @Configuration classes with CGLIB proxying.
Why var individualLogging: Boolean = false? - PRODUCTION LESSON LEARNED
CGLIB Proxying Requirement: When using @Configuration (not just @ConfigurationProperties), Spring Boot creates CGLIB proxies that require setters for environment variable binding, even for scalar types. Using val causes: "No setter found for property: individual-logging"
Production Error:
Failed to bind properties under 'embabel.agent.platform.migration.warnings'
Property: embabel.agent.platform.migration.warnings.individual-logging
Value: "true"
Origin: System Environment Property "EMBABEL_AGENT_PLATFORM_MIGRATION_WARNINGS_INDIVIDUAL_LOGGING"
Reason: java.lang.IllegalStateException: No setter found for property: individual-loggingKey Distinction: Pure @ConfigurationProperties data classes can use val with constructor binding, but @Configuration + @ConfigurationProperties classes need var for CGLIB proxy compatibility.
Expected Usage Pattern:
# Environment variable binding (requires var with @Configuration classes)
export EMBABEL_AGENT_PLATFORM_MIGRATION_WARNINGS_INDIVIDUAL_LOGGING=trueSpring Boot Property Binding Reality Check:
⚠️ Scalar types with @Configuration:
varrequired for CGLIB proxy compatibility❌ Complex types (List, Map):
varrequired for reliable environment variable binding✅ Constructor Binding: Kotlin data classes automatically use constructor binding for
val✅ Setter Binding: Properties with
varuse setter-based binding
Production Decision: Uses var due to CGLIB proxy requirements with @Configuration annotation.
See also
for comprehensive val vs var binding documentation
for the real reason var is needed (List properties)