本文整理汇总了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()
);
}
示例2: clusteredEventManager
@Bean
@Clustered
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public EventManager clusteredEventManager(final @Qualifier("clusteredEventManagerServiceQueue")
ServiceQueue eventManagerServiceQueue) {
return eventManagerServiceQueue.createProxy(EventManager.class);
}
示例3: customFieldsRequestBuilder
@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolFieldsRequestBuilder customFieldsRequestBuilder(
@Qualifier(FIELDS_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<IdolFieldsRequestBuilder> requestBuilderFactory
) {
return requestBuilderFactory.getObject();
}
示例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();
}
示例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();
}
示例6: qbitStatsCollector
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public StatsCollector qbitStatsCollector(final @Qualifier("qbitStatService")
StatService qbitStatService) {
return new StatsCollectorBuffer(qbitStatService);
}
示例7: customViewRequestBuilder
@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolViewRequestBuilder customViewRequestBuilder(
@Qualifier(VIEW_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<IdolViewRequestBuilder> requestBuilderFactory
) {
return requestBuilderFactory.getObject();
}
示例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();
}
示例9: customQueryRequestBuilder
@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public HodQueryRequestBuilder customQueryRequestBuilder(
@Qualifier(QUERY_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<HodQueryRequestBuilder> requestBuilderFactory
) {
return requestBuilderFactory.getObject();
}
示例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);
}
示例11: customParametricRequestBuilder
@Bean
@Primary
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public IdolParametricRequestBuilder customParametricRequestBuilder(
@Qualifier(PARAMETRIC_REQUEST_BUILDER_BEAN_NAME) final ObjectFactory<IdolParametricRequestBuilder> requestBuilderFactory
) {
return requestBuilderFactory.getObject();
}
示例12: cas2SuccessView
@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2SuccessView() {
return new CasProtocolView(casProperties.getView().getCas2().getSuccess(), applicationContext,
springTemplateEngine, thymeleafProperties);
}
示例13: cas2ServiceFailureView
@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2ServiceFailureView() {
return new CasProtocolView(casProperties.getView().getCas2().getFailure(), applicationContext,
springTemplateEngine, thymeleafProperties);
}
示例14: cas2ProxyFailureView
@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2ProxyFailureView() {
return new CasProtocolView(casProperties.getView().getCas2().getProxy().getFailure(), applicationContext,
springTemplateEngine, thymeleafProperties);
}
示例15: cas2ProxySuccessView
@Bean
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public CasProtocolView cas2ProxySuccessView() {
return new CasProtocolView(casProperties.getView().getCas2().getProxy().getSuccess(),
applicationContext, springTemplateEngine, thymeleafProperties);
}