org.springframework.boot.bind

Class RelaxedPropertyResolver

  • All Implemented Interfaces:
    org.springframework.core.env.PropertyResolver


    public class RelaxedPropertyResolver
    extends Object
    implements org.springframework.core.env.PropertyResolver
    PropertyResolver that attempts to resolve values using RelaxedNames.
    Author:
    Phillip Webb
    See Also:
    RelaxedNames
    • Constructor Detail

      • RelaxedPropertyResolver

        public RelaxedPropertyResolver(org.springframework.core.env.PropertyResolver resolver)
      • RelaxedPropertyResolver

        public RelaxedPropertyResolver(org.springframework.core.env.PropertyResolver resolver,
                                       String prefix)
    • Method Detail

      • getProperty

        public String getProperty(String key)
        Specified by:
        getProperty in interface org.springframework.core.env.PropertyResolver
      • getProperty

        public String getProperty(String key,
                                  String defaultValue)
        Specified by:
        getProperty in interface org.springframework.core.env.PropertyResolver
      • getProperty

        public <T> T getProperty(String key,
                                 Class<T> targetType)
        Specified by:
        getProperty in interface org.springframework.core.env.PropertyResolver
      • getProperty

        public <T> T getProperty(String key,
                                 Class<T> targetType,
                                 T defaultValue)
        Specified by:
        getProperty in interface org.springframework.core.env.PropertyResolver
      • getPropertyAsClass

        @Deprecated
        public <T> Class<T> getPropertyAsClass(String key,
                                                           Class<T> targetType)
        Deprecated. 
        Specified by:
        getPropertyAsClass in interface org.springframework.core.env.PropertyResolver
      • containsProperty

        public boolean containsProperty(String key)
        Specified by:
        containsProperty in interface org.springframework.core.env.PropertyResolver
      • resolvePlaceholders

        public String resolvePlaceholders(String text)
        Specified by:
        resolvePlaceholders in interface org.springframework.core.env.PropertyResolver
      • ignoringUnresolvableNestedPlaceholders

        public static RelaxedPropertyResolver ignoringUnresolvableNestedPlaceholders(org.springframework.core.env.Environment environment,
                                                                                     String prefix)
        Return a property resolver for the environment, preferring one that ignores unresolvable nested placeholders.
        Parameters:
        environment - the source environment
        prefix - the prefix
        Returns:
        a property resolver for the environment
        Since:
        1.4.3

Copyright © 2018 Pivotal Software, Inc.. All rights reserved.