use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class DynamoDbTicketRegistryConfiguration method ticketRegistry.
@Autowired
@RefreshScope
@Bean
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
final DynamoDbTicketRegistryProperties db = casProperties.getTicket().getRegistry().getDynamoDb();
final CryptographyProperties crypto = db.getCrypto();
return new DynamoDbTicketRegistry(Beans.newTicketRegistryCipherExecutor(crypto), dynamoDbTicketRegistryFacilitator(ticketCatalog));
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class HazelcastTicketRegistryConfiguration method ticketRegistry.
@Autowired
@Bean
public TicketRegistry ticketRegistry(@Qualifier("ticketCatalog") final TicketCatalog ticketCatalog) {
final HazelcastProperties hz = casProperties.getTicket().getRegistry().getHazelcast();
final HazelcastTicketRegistry r = new HazelcastTicketRegistry(hazelcast(ticketCatalog), ticketCatalog, hz.getPageSize());
r.setCipherExecutor(Beans.newTicketRegistryCipherExecutor(hz.getCrypto()));
return r;
}
use of org.springframework.beans.factory.annotation.Autowired in project cas by apereo.
the class LdapServiceRegistryConfiguration method serviceRegistryDao.
@Bean
@RefreshScope
@Autowired
public ServiceRegistryDao serviceRegistryDao(@Qualifier("ldapServiceRegistryMapper") final LdapRegisteredServiceMapper mapper) {
final LdapServiceRegistryProperties ldap = casProperties.getServiceRegistry().getLdap();
final ConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(ldap);
return new LdapServiceRegistryDao(connectionFactory, ldap.getBaseDn(), mapper, ldap);
}
use of org.springframework.beans.factory.annotation.Autowired in project pinpoint by naver.
the class HbaseTraceDao method setSpanMapper.
@Autowired
@Qualifier("spanMapper")
public void setSpanMapper(RowMapper<List<SpanBo>> spanMapper) {
final Logger logger = LoggerFactory.getLogger(spanMapper.getClass());
if (logger.isDebugEnabled()) {
spanMapper = CellTraceMapper.wrap(spanMapper);
}
this.spanMapper = spanMapper;
}
use of org.springframework.beans.factory.annotation.Autowired in project spring-framework by spring-projects.
the class SpringExtension method supports.
/**
* Determine if the value for the {@link Parameter} in the supplied {@link ParameterContext}
* should be autowired from the test's {@link ApplicationContext}.
* <p>Returns {@code true} if the parameter is declared in a {@link Constructor}
* that is annotated with {@link Autowired @Autowired} and otherwise delegates to
* {@link ParameterAutowireUtils#isAutowirable}.
* <p><strong>WARNING</strong>: If the parameter is declared in a {@code Constructor}
* that is annotated with {@code @Autowired}, Spring will assume the responsibility
* for resolving all parameters in the constructor. Consequently, no other registered
* {@link ParameterResolver} will be able to resolve parameters.
* @see #resolve
* @see ParameterAutowireUtils#isAutowirable
*/
@Override
public boolean supports(ParameterContext parameterContext, ExtensionContext extensionContext) {
Parameter parameter = parameterContext.getParameter();
Executable executable = parameter.getDeclaringExecutable();
return (executable instanceof Constructor && AnnotatedElementUtils.hasAnnotation(executable, Autowired.class)) || ParameterAutowireUtils.isAutowirable(parameter);
}
Aggregations