createPropertySource method

  1. @override
AbstractPropertySource<Object> createPropertySource(
  1. String? name,
  2. EncodedResource resource
)
override

Reads resource synchronously, decoded with its encoding, and returns its properties as one source. Name the source name when it is given (the annotation's name), otherwise after the resource.

Implementation

@override
AbstractPropertySource<Object> createPropertySource(
  String? name,
  EncodedResource resource,
) => ResourcePropertySource.fromResource(
  resource.resource,
  name: name,
  encoding: resource.encoding ?? utf8,
);