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

org.zodiac.autoconfigure.bootstrap.rule.AppRuleBootstrapConfiguration Maven / Gradle / Ivy

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

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.core.Ordered;
import org.zodiac.autoconfigure.bootstrap.condition.ConditionalOnRuleEnabled;
import org.zodiac.core.bootstrap.rule.AppRuleConfigPropertySourceLocator;
import org.zodiac.core.bootstrap.rule.AppRuleProviderCustomizer;
import org.zodiac.core.constants.AppOrderConstants;

import java.util.stream.Collectors;

@SpringBootConfiguration
@ConditionalOnRuleEnabled
public class AppRuleBootstrapConfiguration implements Ordered {

    @Bean
    protected AppRuleConfigPropertySourceLocator
        metadataConfigPropertySourceLocator(ObjectProvider objectProvider) {
        return new AppRuleConfigPropertySourceLocator(objectProvider.stream().collect(Collectors.toList()));
    }

    @Override
    public int getOrder() {
        return AppOrderConstants.BootstrapOrder.RULE_ORDER;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy