All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ulisesbocchio.jasyptspringboot.environment.MutableConfigurablePropertyResolver Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package com.ulisesbocchio.jasyptspringboot.environment;

import lombok.experimental.Delegate;
import org.springframework.core.env.ConfigurablePropertyResolver;
import org.springframework.core.env.MutablePropertySources;

import java.util.function.Function;

/**
 * @author boccs002
 */
public class MutableConfigurablePropertyResolver implements ConfigurablePropertyResolver {

    private final Function factory;
    @Delegate
    private ConfigurablePropertyResolver delegate;

    public MutableConfigurablePropertyResolver(MutablePropertySources propertySources, Function factory) {
        this.factory = factory;
        this.delegate = factory.apply(propertySources);
    }

    public void setPropertySources(MutablePropertySources propertySources) {
        this.delegate = this.factory.apply(propertySources);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy