Search in sources :

Example 1 with DefaultPropertyPlaceholderResolver

use of io.micronaut.context.env.DefaultPropertyPlaceholderResolver in project micronaut-graphql by micronaut-projects.

the class GraphiQLController method replaceParameters.

private String replaceParameters(final String str, final Map<String, String> parameters) {
    Map<String, Object> map = new HashMap<>();
    map.putAll(parameters);
    PropertyResolver propertyResolver = new MapPropertyResolver(map);
    PropertyPlaceholderResolver propertyPlaceholderResolver = new DefaultPropertyPlaceholderResolver(propertyResolver, conversionService);
    return propertyPlaceholderResolver.resolvePlaceholders(str).get();
}
Also used : DefaultPropertyPlaceholderResolver(io.micronaut.context.env.DefaultPropertyPlaceholderResolver) HashMap(java.util.HashMap) MapPropertyResolver(io.micronaut.core.value.MapPropertyResolver) DefaultPropertyPlaceholderResolver(io.micronaut.context.env.DefaultPropertyPlaceholderResolver) PropertyPlaceholderResolver(io.micronaut.context.env.PropertyPlaceholderResolver) PropertyResolver(io.micronaut.core.value.PropertyResolver) MapPropertyResolver(io.micronaut.core.value.MapPropertyResolver)

Aggregations

DefaultPropertyPlaceholderResolver (io.micronaut.context.env.DefaultPropertyPlaceholderResolver)1 PropertyPlaceholderResolver (io.micronaut.context.env.PropertyPlaceholderResolver)1 MapPropertyResolver (io.micronaut.core.value.MapPropertyResolver)1 PropertyResolver (io.micronaut.core.value.PropertyResolver)1 HashMap (java.util.HashMap)1