Configuration class final
Marks a class as a configuration component in the application.
Configuration classes typically contain methods annotated with @Bean that create and configure application components. They are used to set up external dependencies, configure application settings, and define beans.
Example:
@Configuration()
class AppConfig {
@Bean()
Database createDatabase(ApplicationSettings settings) {
return Database.connect(settings['database_url']);
}
}
- Implemented types
Constructors
- Configuration()
-
Creates a Configuration annotation.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- registerWithInterfaceOrSuperType → bool
-
Determines if the component should be registered with its interface or supertype.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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