Class YamlPropertySourceFactory

  • All Implemented Interfaces:
    org.springframework.core.io.support.PropertySourceFactory

    public class YamlPropertySourceFactory
    extends Object
    implements org.springframework.core.io.support.PropertySourceFactory
    Because loading yaml files with @PropertySources is not supported in Spring, we need this custom implementation for processing the yamls and converting them to injectable properties in the Spring application context.
    • Constructor Detail

      • YamlPropertySourceFactory

        public YamlPropertySourceFactory()
    • Method Detail

      • createPropertySource

        public org.springframework.core.env.PropertySource<?> createPropertySource​(String name,
                                                                                   org.springframework.core.io.support.EncodedResource encodedResource)
                                                                            throws IOException
        Specified by:
        createPropertySource in interface org.springframework.core.io.support.PropertySourceFactory
        Throws:
        IOException