Java 类org.springframework.boot.autoconfigure.web.WebMvcRegistrations 实例源码

项目:spring-cloud-template    文件:FeignConfig.java   
@Bean
public WebMvcRegistrations feignWebRegistrations() {
    return new WebMvcRegistrationsAdapter() {
        @Override
        public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
            return new FeignRequestMappingHandlerMapping();
        }
    };
}
项目:spring-cloud-sample    文件:FeignConfig.java   
@Bean
public WebMvcRegistrations feignWebRegistrations() {
    return new WebMvcRegistrationsAdapter() {
        @Override
        public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
            return new RequestMappingHandlerMapping() {
                @Override
                protected boolean isHandler(Class<?> beanType) {
                    return super.isHandler(beanType) && (AnnotationUtils.findAnnotation(beanType, FeignClient.class) == null);
                }
            };
        }
    };
}