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

org.zodiac.autoconfigure.bootstrap.discovery.simple.SimpleAppDiscoveryProperties Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.bootstrap.discovery.simple;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.zodiac.commons.constants.SystemPropertiesConstants;
import org.zodiac.core.bootstrap.discovery.simple.SimpleAppDiscoveryInfo;

@ConfigurationProperties(prefix = SystemPropertiesConstants.Zodiac.SPRING_BOOTSTRAP_DISCOVERY_SIMPLE_PREFIX)
public class SimpleAppDiscoveryProperties extends SimpleAppDiscoveryInfo implements InitializingBean {

    public SimpleAppDiscoveryProperties() {
        super();
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        init();
    }

    protected void init() {
        this.getRemote().forEach((key, instances) -> {
            instances.forEach(instance -> instance.setAppServiceId(key));
        });
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy