fun.fengwk.gateway.share.context.GatewayContextAutoConfiguration Maven / Gradle / Ivy
package fun.fengwk.gateway.share.context;
import fun.fengwk.convention4j.springboot.starter.web.context.WebContext;
import fun.fengwk.convention4j.springboot.starter.web.context.WebContextAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
/**
* @author fengwk
*/
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass(WebContext.class)
@AutoConfiguration(after = WebContextAutoConfiguration.class)
public class GatewayContextAutoConfiguration {
@ConditionalOnMissingBean
@Bean
public GatewayContext gatewayContext() {
return new GatewayContextImpl();
}
}