org.springframework.context.ApplicationContext.getBeanProvider()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(266)

本文整理了Java中org.springframework.context.ApplicationContext.getBeanProvider()方法的一些代码示例,展示了ApplicationContext.getBeanProvider()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationContext.getBeanProvider()方法的具体详情如下:
包路径:org.springframework.context.ApplicationContext
类名称:ApplicationContext
方法名:getBeanProvider

ApplicationContext.getBeanProvider介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-framework

private List<RouterFunction<?>> routerFunctions() {
  List<RouterFunction<?>> functions = obtainApplicationContext()
      .getBeanProvider(RouterFunction.class)
      .orderedStream()
      .map(router -> (RouterFunction<?>)router)
      .collect(Collectors.toList());
  return (!CollectionUtils.isEmpty(functions) ? functions : Collections.emptyList());
}

代码示例来源:origin: org.springframework.boot/spring-boot

private List<ConfigurationPropertiesBindHandlerAdvisor> getBindHandlerAdvisors() {
  return this.applicationContext
      .getBeanProvider(ConfigurationPropertiesBindHandlerAdvisor.class)
      .orderedStream().collect(Collectors.toList());
}

代码示例来源:origin: spring-projects/spring-framework

.getBeanProvider(WebFilter.class)
    .orderedStream()
    .collect(Collectors.toList());
builder.filters(filters -> filters.addAll(webFilters));
List<WebExceptionHandler> exceptionHandlers = context
    .getBeanProvider(WebExceptionHandler.class)
    .orderedStream()
    .collect(Collectors.toList());

代码示例来源:origin: org.springframework/spring-web

.getBeanProvider(WebFilter.class)
    .orderedStream()
    .collect(Collectors.toList());
builder.filters(filters -> filters.addAll(webFilters));
List<WebExceptionHandler> exceptionHandlers = context
    .getBeanProvider(WebExceptionHandler.class)
    .orderedStream()
    .collect(Collectors.toList());

代码示例来源:origin: unic/neba

@Override
public <T> ObjectProvider<T> getBeanProvider(ResolvableType resolvableType) {
  return wrapped.getBeanProvider(resolvableType);
}

代码示例来源:origin: unic/neba

@Override
public <T> ObjectProvider<T> getBeanProvider(Class<T> aClass) {
  return wrapped.getBeanProvider(aClass);
}

代码示例来源:origin: joinfaces/joinfaces

@Override
public <T> Collection<T> produce(Class<T> type) {
  ApplicationContext applicationContext = ApplicationContextProvider.getApplicationContext();
  if (applicationContext == null) {
    return Collections.emptyList();
  }
  return applicationContext.getBeanProvider(type)
      .orderedStream()
      .collect(Collectors.toList());
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web

.getBeanProvider(WebFilter.class)
    .orderedStream()
    .collect(Collectors.toList());
builder.filters(filters -> filters.addAll(webFilters));
List<WebExceptionHandler> exceptionHandlers = context
    .getBeanProvider(WebExceptionHandler.class)
    .orderedStream()
    .collect(Collectors.toList());

代码示例来源:origin: org.springframework.fu/spring-fu-autoconfigure-adapter

@Override
  public ServerCodecConfigurer serverCodecConfigurer() {
    ServerCodecConfigurer configurer = ServerCodecConfigurer.create();
    configurer.registerDefaults(false);
    getApplicationContext().getBeanProvider(CodecCustomizer.class)
        .forEach((customizer) -> customizer.customize(configurer));
    return configurer;
  }
}

相关文章