ConditionalOnProfile constructor
Marks a class or method to be included only when specific profiles are active.
This is useful for registering pods or configuration only in certain environments
such as dev
, test
, or prod
.
Example
@ConditionalOnProfile(['dev', 'local'])
class DevConfig {}
If none of the specified profiles are active, the pod or class will be skipped.
Profile activation is typically controlled via Environment.activeProfiles
.
Implementation
const ConditionalOnProfile(this.value);