DefaultPropertySourceFactory class final
The factory @PropertySource uses when none is named: it reads the file
as .properties.
It creates a ResourcePropertySource named after the resource unless a
name is given. Applications do not use it directly; it is the default
value of PropertySourceProcessor.processPropertySource's factory.
final source = const DefaultPropertySourceFactory().createPropertySource(
null,
EncodedResource(FileSystemResource('config/app.properties')),
);
Spring (Java):
PropertySource<?> source = new DefaultPropertySourceFactory()
.createPropertySource(null, new EncodedResource(
new FileSystemResource("config/app.properties")));
- Implemented types
Constructors
- DefaultPropertySourceFactory()
-
Creates the factory. It holds no state, so a
constone can be shared.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createPropertySource(
String? name, EncodedResource resource) → AbstractPropertySource< Object> -
Reads
resourcesynchronously, decoded with its encoding, and returns its properties as one source. Name the sourcenamewhen it is given (the annotation'sname), otherwise after the resource.override -
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