当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurableBeanFactory.SCOPE_PROTOTYPE属性代码示例

本文整理汇总了Java中org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE属性的典型用法代码示例。如果您正苦于以下问题:Java ConfigurableBeanFactory.SCOPE_PROTOTYPE属性的具体用法?Java ConfigurableBeanFactory.SCOPE_PROTOTYPE怎么用?Java ConfigurableBeanFactory.SCOPE_PROTOTYPE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.springframework.beans.factory.config.ConfigurableBeanFactory的用法示例。


在下文中一共展示了ConfigurableBeanFactory.SCOPE_PROTOTYPE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: auditorAware

@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public AuditorAware<Username> auditorAware() {

    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();

    log.debug("current authentication:" + authentication);

    if (authentication == null || !authentication.isAuthenticated()) {
        return () -> Optional.<Username>empty();
    }

    return () -> Optional.of(
        Username.builder()
            .username(((UserDetails) authentication.getPrincipal()).getUsername())
            .build()
    );

}
 
开发者ID:hantsy,项目名称:spring-microservice-sample,代码行数:19,代码来源:DataJpaConfig.java

示例2: clusteredEventManager

@Bean
@Clustered
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public EventManager clusteredEventManager(final @Qualifier("clusteredEventManagerServiceQueue")
                                          ServiceQueue eventManagerServiceQueue) {

    return eventManagerServiceQueue.createProxy(EventManager.class);
}
 
开发者ID:advantageous,项目名称:qbit-extensions,代码行数:8,代码来源:ClusterConfiguration.java

示例3: customFieldsRequestBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolFieldsRequestBuilder customFieldsRequestBuilder(
        @Qualifier(FIELDS_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<IdolFieldsRequestBuilder> requestBuilderFactory
) {
    return requestBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:8,代码来源:IdolCustomRequestBuilderConfiguration.java

示例4: getContentRequestIndexBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolGetContentRequestIndexBuilder getContentRequestIndexBuilder(
        @Qualifier(GET_CONTENT_REQUEST_INDEX_BUILDER_BEAN_NAME) final ObjectFactory<IdolGetContentRequestIndexBuilder> getContentRequestIndexBuilderFactory
) {
    return getContentRequestIndexBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:8,代码来源:IdolCustomRequestBuilderConfiguration.java

示例5: getContentRequestIndexBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public HodGetContentRequestIndexBuilder getContentRequestIndexBuilder(
        @Qualifier(GET_CONTENT_REQUEST_INDEX_BUILDER_BEAN_NAME) final ObjectFactory<HodGetContentRequestIndexBuilder> getContentRequestIndexBuilderFactory
) {
    return getContentRequestIndexBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:8,代码来源:HodCustomRequestBuilderConfiguration.java

示例6: qbitStatsCollector

@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public StatsCollector qbitStatsCollector(final @Qualifier("qbitStatService")
                                         StatService qbitStatService) {

    return new StatsCollectorBuffer(qbitStatService);
}
 
开发者ID:advantageous,项目名称:qbit-extensions,代码行数:7,代码来源:StatsConfiguration.java

示例7: customViewRequestBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolViewRequestBuilder customViewRequestBuilder(
        @Qualifier(VIEW_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<IdolViewRequestBuilder> requestBuilderFactory
) {
    return requestBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:8,代码来源:IdolCustomRequestBuilderConfiguration.java

示例8: customGetContentRequestBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public HodGetContentRequestBuilder customGetContentRequestBuilder(
        @Qualifier(GET_CONTENT_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<HodGetContentRequestBuilder> getContentRequestBuilderFactory) {
    return getContentRequestBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:7,代码来源:HodCustomRequestBuilderConfiguration.java

示例9: customQueryRequestBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public HodQueryRequestBuilder customQueryRequestBuilder(
        @Qualifier(QUERY_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<HodQueryRequestBuilder> requestBuilderFactory
) {
    return requestBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:8,代码来源:HodCustomRequestBuilderConfiguration.java

示例10: okClient

@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
OkClient okClient() {
  val client = okHttpClientConfig.create();
  client.setConnectionPool(new ConnectionPool(maxIdleConnections, keepAliveDurationMs));
  client.setRetryOnConnectionFailure(retryOnConnectionFailure);
  client.interceptors().add(new RetryingInterceptor(maxElapsedBackoffMs));
  return new OkClient(client);
}
 
开发者ID:spinnaker,项目名称:fiat,代码行数:9,代码来源:RetrofitConfig.java

示例11: customParametricRequestBuilder

@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolParametricRequestBuilder customParametricRequestBuilder(
        @Qualifier(PARAMETRIC_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<IdolParametricRequestBuilder> requestBuilderFactory
) {
    return requestBuilderFactory.getObject();
}
 
开发者ID:hpe-idol,项目名称:haven-search-components,代码行数:8,代码来源:IdolCustomRequestBuilderConfiguration.java

示例12: cas2SuccessView

@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2SuccessView() {
    return new CasProtocolView(casProperties.getView().getCas2().getSuccess(), applicationContext,
            springTemplateEngine, thymeleafProperties);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:6,代码来源:CasProtocolViewsConfiguration.java

示例13: cas2ServiceFailureView

@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2ServiceFailureView() {
    return new CasProtocolView(casProperties.getView().getCas2().getFailure(), applicationContext,
            springTemplateEngine, thymeleafProperties);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:6,代码来源:CasProtocolViewsConfiguration.java

示例14: cas2ProxyFailureView

@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2ProxyFailureView() {
    return new CasProtocolView(casProperties.getView().getCas2().getProxy().getFailure(), applicationContext,
            springTemplateEngine, thymeleafProperties);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:6,代码来源:CasProtocolViewsConfiguration.java

示例15: cas2ProxySuccessView

@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2ProxySuccessView() {
    return new CasProtocolView(casProperties.getView().getCas2().getProxy().getSuccess(),
            applicationContext, springTemplateEngine, thymeleafProperties);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:6,代码来源:CasProtocolViewsConfiguration.java


注:本文中的org.springframework.beans.factory.config.ConfigurableBeanFactory.SCOPE_PROTOTYPE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。