Search in sources :

Example 31 with Qualifier

use of org.springframework.beans.factory.annotation.Qualifier in project wombat by PLOS.

the class SpringConfiguration method searchFilterTypeMap.

@Bean
@Qualifier("searchFilters")
public Map<String, SearchFilterType> searchFilterTypeMap(JournalFilterType journalFilterType) {
    ImmutableMap.Builder<String, SearchFilterType> builder = ImmutableMap.builder();
    builder.put("journal", journalFilterType);
    for (SingletonSearchFilterType value : SingletonSearchFilterType.values()) {
        builder.put(value.name().toLowerCase(), value);
    }
    return builder.build();
}
Also used : SearchFilterType(org.ambraproject.wombat.model.SearchFilterType) SingletonSearchFilterType(org.ambraproject.wombat.model.SingletonSearchFilterType) SingletonSearchFilterType(org.ambraproject.wombat.model.SingletonSearchFilterType) ImmutableMap(com.google.common.collect.ImmutableMap) Qualifier(org.springframework.beans.factory.annotation.Qualifier) Bean(org.springframework.context.annotation.Bean)

Example 32 with Qualifier

use of org.springframework.beans.factory.annotation.Qualifier in project spring-boot-admin by codecentric.

the class SpringBootAdminClientAutoConfiguration method registrationTaskScheduler.

@Bean
@Qualifier("registrationTaskScheduler")
public TaskScheduler registrationTaskScheduler() {
    ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
    taskScheduler.setPoolSize(1);
    taskScheduler.setRemoveOnCancelPolicy(true);
    taskScheduler.setThreadNamePrefix("registrationTask");
    return taskScheduler;
}
Also used : ThreadPoolTaskScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler) Qualifier(org.springframework.beans.factory.annotation.Qualifier) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 33 with Qualifier

use of org.springframework.beans.factory.annotation.Qualifier in project spring-boot-admin by codecentric.

the class AdminServerCoreConfiguration method updateTaskScheduler.

@Bean
@Qualifier("updateTaskScheduler")
public ThreadPoolTaskScheduler updateTaskScheduler() {
    ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
    taskScheduler.setPoolSize(1);
    taskScheduler.setRemoveOnCancelPolicy(true);
    taskScheduler.setThreadNamePrefix("updateTask");
    return taskScheduler;
}
Also used : ThreadPoolTaskScheduler(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler) Qualifier(org.springframework.beans.factory.annotation.Qualifier) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 34 with Qualifier

use of org.springframework.beans.factory.annotation.Qualifier in project pinpoint by naver.

the class HbaseTraceDaoV2 method setSpanMapperV2.

@Autowired
@Qualifier("spanMapperV2")
public void setSpanMapperV2(RowMapper<List<SpanBo>> spanMapperV2) {
    final Logger logger = LoggerFactory.getLogger(spanMapperV2.getClass());
    if (logger.isDebugEnabled()) {
        spanMapperV2 = CellTraceMapper.wrap(spanMapperV2);
    }
    this.spanMapperV2 = spanMapperV2;
}
Also used : Logger(org.slf4j.Logger) Autowired(org.springframework.beans.factory.annotation.Autowired) Qualifier(org.springframework.beans.factory.annotation.Qualifier)

Example 35 with Qualifier

use of org.springframework.beans.factory.annotation.Qualifier in project hono by eclipse.

the class ApplicationConfig method tokenValidator.

/**
 * Creates a helper for validating JWTs asserting a client's identity and authorities.
 * <p>
 * An instance of this bean is required for the {@code HonoSaslAuthenticationFactory}.
 *
 * @return The bean.
 */
@Bean
@Qualifier(AuthenticationConstants.QUALIFIER_AUTHENTICATION)
public AuthTokenHelper tokenValidator() {
    ServiceConfigProperties amqpProps = amqpProperties();
    AuthenticationServerConfigProperties serviceProps = serviceProperties();
    if (!serviceProps.getValidation().isAppropriateForValidating() && amqpProps.getCertPath() != null) {
        // fall back to TLS configuration
        serviceProps.getValidation().setCertPath(amqpProps.getCertPath());
    }
    return AuthTokenHelperImpl.forValidating(vertx(), serviceProps.getValidation());
}
Also used : ServiceConfigProperties(org.eclipse.hono.config.ServiceConfigProperties) Qualifier(org.springframework.beans.factory.annotation.Qualifier) Bean(org.springframework.context.annotation.Bean) ObjectFactoryCreatingFactoryBean(org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean)

Aggregations

Qualifier (org.springframework.beans.factory.annotation.Qualifier)66 Bean (org.springframework.context.annotation.Bean)59 RmiProxyFactoryBean (org.springframework.remoting.rmi.RmiProxyFactoryBean)18 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)12 Configuration (org.springframework.context.annotation.Configuration)7 EnableConfigurationProperties (org.springframework.boot.context.properties.EnableConfigurationProperties)6 lombok.val (lombok.val)5 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)5 ConfigurationProperties (org.springframework.boot.context.properties.ConfigurationProperties)5 RequestResponseClientConfigProperties (org.eclipse.hono.client.RequestResponseClientConfigProperties)4 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)4 ScopedProxyMode (org.springframework.context.annotation.ScopedProxyMode)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 HashSet (java.util.HashSet)3 List (java.util.List)3 Collectors (java.util.stream.Collectors)3 ClientFactoryBuilder (com.linecorp.armeria.client.ClientFactoryBuilder)2 IdMCacheConfiguration (eu.bcvsolutions.idm.core.api.config.cache.IdMCacheConfiguration)2 Supplier (java.util.function.Supplier)2