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

org.zodiac.autoconfigure.bootstrap.breaker.routing.mock.MockAppRoutingAutoConfiguration Maven / Gradle / Ivy

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

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;
import org.zodiac.commons.constants.SystemPropertiesConstants;
import org.zodiac.core.bootstrap.breaker.routing.mock.MockAppRoutingService;

@Profile(value = "mock")
@SpringBootConfiguration
@ConditionalOnProperty(value = SystemPropertiesConstants.Zodiac.SPRING_BOOTSTRAP_BREAKER_ROUTING_MOCK_ENABLED, havingValue = "true")
@EnableConfigurationProperties(MockAppRoutingProperties.class)
public class MockAppRoutingAutoConfiguration {

    public MockAppRoutingAutoConfiguration() {
        super();
    }

    @Bean
    @ConditionalOnMissingBean
    @ConfigurationProperties(prefix = SystemPropertiesConstants.Zodiac.SPRING_BOOTSTRAP_BREAKER_ROUTING_MOCK_PREFIX)
    protected MockAppRoutingService mockRoutingService(MockAppRoutingProperties mockRoutingProperties) {
        return new MockAppRoutingService(mockRoutingProperties);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy