org.zodiac.autoconfigure.loadbalancer.ribbon.ReactiveInfraRoleAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.loadbalancer.ribbon;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.zodiac.loadbalancer.ribbon.filter.InfraRoleWebFilter;
@SpringBootConfiguration
//@ConditionalOnSpringCloudBootstrapDisabled
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnClass(name = {"org.zodiac.loadbalancer.ribbon.filter.InfraRoleServletFilter", "org.apache.skywalking.apm.toolkit.trace.ActiveSpan"})
public class ReactiveInfraRoleAutoConfiguration {
public ReactiveInfraRoleAutoConfiguration() {
super();
}
@Bean
@ConditionalOnMissingBean
protected InfraRoleWebFilter infraRoleWebFluxServerFilter() {
return new InfraRoleWebFilter();
}
}