Config (Grails 5.1.1)

Package: grails.config

## [Groovy] Interface Config

- Map

- All Superinterfaces:
    ConfigMap, java.lang.Iterable<Map.Entry<java.lang.String, java.lang.Object>>, java.util.Map<java.lang.String, java.lang.Object>

      interface Config
      extends ConfigMap, org.springframework.core.env.PropertyResolver

  Interface to application configuration

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `abstract java.util.Map<java.lang.String, java.lang.Object>` | `flatten()` Returns: The flat version of the config
    `<T>` | `abstract T` | `getProperty(java.lang.String key, java.lang.Class<T> targetType, T defaultValue, java.util.List<T> allowedValues)` Return the property value associated with the given key, or `defaultValue` if the key cannot be resolved.
    `` | `abstract Config` | `merge(java.util.Map<java.lang.String, java.lang.Object> toMerge)` Merge another config and return this config
    `` | `abstract java.util.Properties` | `toProperties()` Converts the config to properties

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface ConfigMap` | `getAt, getProperty, getProperty, getRequiredProperty, navigate, setAt`
    `interface org.springframework.core.env.PropertyResolver` | `org.springframework.core.env.PropertyResolver#resolvePlaceholders(java.lang.String), org.springframework.core.env.PropertyResolver#resolveRequiredPlaceholders(java.lang.String), org.springframework.core.env.PropertyResolver#getRequiredProperty(java.lang.String), org.springframework.core.env.PropertyResolver#getRequiredProperty(java.lang.String, java.lang.Class), org.springframework.core.env.PropertyResolver#containsProperty(java.lang.String), org.springframework.core.env.PropertyResolver#getProperty(java.lang.String, java.lang.Class, java.lang.Object), org.springframework.core.env.PropertyResolver#getProperty(java.lang.String), org.springframework.core.env.PropertyResolver#getProperty(java.lang.String, java.lang.String), org.springframework.core.env.PropertyResolver#getProperty(java.lang.String, java.lang.Class)`

- - ### Method Detail

    - #### @java.lang.Deprecated abstract java.util.Map<java.lang.String, java.lang.Object> flatten()

      Returns:
        The flat version of the config

    - #### <T> abstract T getProperty(java.lang.String key, java.lang.Class<T> targetType, T defaultValue, java.util.List<T> allowedValues)

      Return the property value associated with the given key, or `defaultValue` if the key cannot be resolved.

      Parameters:
        `key` - the property name to resolve
        `targetType` - the expected type of the property value
        `defaultValue` - the default value to return if no value is found
        `the` - allowable values
      See Also:
        getRequiredProperty(String, Class)

    - #### abstract Config merge(java.util.Map<java.lang.String, java.lang.Object> toMerge)

      Merge another config and return this config

      Parameters:
        `toMerge` - The map to merge
      Returns:
        This config

    - #### abstract java.util.Properties toProperties()

      Converts the config to properties

      Returns:
        The properties