Package io.micronaut.spring.core.env
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 Summary
ConstructorDescriptionPropertyResolverAdapter
(io.micronaut.core.value.PropertyResolver propertyResolver, io.micronaut.context.env.PropertyPlaceholderResolver placeholderResolver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsProperty
(String key) getProperty
(String key) <T> T
getProperty
(String key, Class<T> targetType) <T> T
getProperty
(String key, Class<T> targetType, T defaultValue) getProperty
(String key, String defaultValue) io.micronaut.core.value.PropertyResolver
<T> T
getRequiredProperty
(String key, Class<T> targetType) resolvePlaceholders
(String text)
-
Constructor Details
-
PropertyResolverAdapter
public PropertyResolverAdapter(io.micronaut.core.value.PropertyResolver propertyResolver, io.micronaut.context.env.PropertyPlaceholderResolver placeholderResolver) Constructor.- Parameters:
propertyResolver
- The property resolverplaceholderResolver
- The property placeholder resolver
-
-
Method Details
-
getPropertyResolver
public io.micronaut.core.value.PropertyResolver getPropertyResolver()- Returns:
- The micronaut property resolver
-
containsProperty
- Specified by:
containsProperty
in interfaceorg.springframework.core.env.PropertyResolver
-
getProperty
- Specified by:
getProperty
in interfaceorg.springframework.core.env.PropertyResolver
-
getProperty
- Specified by:
getProperty
in interfaceorg.springframework.core.env.PropertyResolver
-
getProperty
- Specified by:
getProperty
in interfaceorg.springframework.core.env.PropertyResolver
-
getProperty
- Specified by:
getProperty
in interfaceorg.springframework.core.env.PropertyResolver
-
getRequiredProperty
- Specified by:
getRequiredProperty
in interfaceorg.springframework.core.env.PropertyResolver
- Throws:
IllegalStateException
-
getRequiredProperty
- Specified by:
getRequiredProperty
in interfaceorg.springframework.core.env.PropertyResolver
- Throws:
IllegalStateException
-
resolvePlaceholders
- Specified by:
resolvePlaceholders
in interfaceorg.springframework.core.env.PropertyResolver
-
resolveRequiredPlaceholders
- Specified by:
resolveRequiredPlaceholders
in interfaceorg.springframework.core.env.PropertyResolver
- Throws:
IllegalArgumentException
-