Class StaticProperties

java.lang.Object
net.n2oapp.properties.StaticProperties
Direct Known Subclasses:
TestStaticProperties

public class StaticProperties extends Object
Convenient typed static access to the properties.
  • Field Details

    • propertyResolver

      protected static org.springframework.core.env.PropertyResolver propertyResolver
  • Constructor Details

    • StaticProperties

      public StaticProperties()
  • Method Details

    • setPropertyResolver

      public void setPropertyResolver(org.springframework.core.env.PropertyResolver propertyResolver)
    • setPropertySources

      public void setPropertySources(org.springframework.core.env.PropertySources propertySources)
    • setPropertySource

      public void setPropertySource(org.springframework.core.env.PropertySource<?> propertySource)
    • setProperties

      public void setProperties(Properties properties)
    • containsProperty

      public static boolean containsProperty(String key)
    • get

      public static String get(String key)
    • getProperty

      public static String getProperty(String key)
    • getBoolean

      public static boolean getBoolean(String key)
    • getInt

      public static int getInt(String key)
    • getInteger

      public static Integer getInteger(String key)
    • getDouble

      public static double getDouble(String key)
    • getList

      public static List<String> getList(String key)
    • getList

      public static List<String> getList(String key, String separator)
    • getList

      public static <T> List<T> getList(String key, String separator, Function<String,T> mapper)
    • isEnabled

      public static boolean isEnabled(String key)
    • getEnum

      public static <T extends Enum<?>> T getEnum(String key, Class<T> enumClass)