Configuration class
Configuration class annotation
Indicates that a class contains one or more @Bean methods and may be
processed by the Dire DI container to generate bean definitions and service
requests for those beans at runtime.
Example:
@Configuration()
class DatabaseConfig {
@Bean()
@Singleton()
Database createDatabase() {
return Database(connectionString: Environment.dbUrl);
}
@Bean()
@Qualifier('cache')
Cache createCache() {
return RedisCache();
}
}
Constructors
- Configuration([String? value])
-
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited