org.zodiac.autoconfigure.loadbalancer.ribbon.ServletInfraRoleAutoConfiguration 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.InfraRoleServletFilter;
@SpringBootConfiguration
//@ConditionalOnSpringCloudBootstrapDisabled
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass(name = {"org.zodiac.loadbalancer.ribbon.filter.InfraRoleServletFilter", "org.apache.skywalking.apm.toolkit.trace.ActiveSpan"})
public class ServletInfraRoleAutoConfiguration {
public ServletInfraRoleAutoConfiguration() {
super();
}
@Bean
@ConditionalOnMissingBean
protected InfraRoleServletFilter infraRoleWebServerFilter() {
return new InfraRoleServletFilter();
}
}