Class PropertyResolverAdapter

java.lang.Object
io.micronaut.spring.core.env.PropertyResolverAdapter
All Implemented Interfaces:
org.springframework.core.env.PropertyResolver

public class PropertyResolverAdapter extends Object implements org.springframework.core.env.PropertyResolver
Adapts a PropertyResolver to a Spring PropertyResolver.
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • PropertyResolverAdapter

      public PropertyResolverAdapter(io.micronaut.core.value.PropertyResolver propertyResolver, io.micronaut.context.env.PropertyPlaceholderResolver placeholderResolver)
      Constructor.
      Parameters:
      propertyResolver - The property resolver
      placeholderResolver - The property placeholder resolver
  • Method Details

    • getPropertyResolver

      public io.micronaut.core.value.PropertyResolver getPropertyResolver()
      Returns:
      The micronaut property resolver
    • containsProperty

      public boolean containsProperty(String key)
      Specified by:
      containsProperty in interface org.springframework.core.env.PropertyResolver
    • 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
    • getRequiredProperty

      public String getRequiredProperty(String key) throws IllegalStateException
      Specified by:
      getRequiredProperty in interface org.springframework.core.env.PropertyResolver
      Throws:
      IllegalStateException
    • getRequiredProperty

      public <T> T getRequiredProperty(String key, Class<T> targetType) throws IllegalStateException
      Specified by:
      getRequiredProperty in interface org.springframework.core.env.PropertyResolver
      Throws:
      IllegalStateException
    • resolvePlaceholders

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

      public String resolveRequiredPlaceholders(String text) throws IllegalArgumentException
      Specified by:
      resolveRequiredPlaceholders in interface org.springframework.core.env.PropertyResolver
      Throws:
      IllegalArgumentException