Java 类org.springframework.beans.factory.annotation.Qualifier 实例源码

项目:busi-support    文件:BusinessDatabaseConfig.java   
@Bean
@Primary
public SqlSessionFactory businessSqlSessionFactory(@Qualifier("businessDataSource") DruidDataSource businessDataSource) throws Exception {
    SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
    sqlSessionFactoryBean.setDataSource(businessDataSource);
    //mybatis分页
    PageHelper pageHelper = new PageHelper();
    Properties props = new Properties();
    props.setProperty("dialect", "mysql");
    props.setProperty("reasonable", "true");
    props.setProperty("supportMethodsArguments", "true");
    props.setProperty("returnPageInfo", "check");
    props.setProperty("params", "count=countSql");
    pageHelper.setProperties(props);
    //添加插件
    sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper});
    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
    sqlSessionFactoryBean.setMapperLocations(resolver.getResources(MAPPERXML_LOCATION));
    return sqlSessionFactoryBean.getObject();
}
项目:springbootWeb    文件:BusinessDatabaseConfig.java   
@Bean
@Primary
public SqlSessionFactory businessSqlSessionFactory(@Qualifier("businessDataSource") DruidDataSource businessDataSource) throws Exception {
    SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
    sqlSessionFactoryBean.setDataSource(businessDataSource);
    //mybatis分页
    Properties props = new Properties();
    props.setProperty("dialect", "mysql");
    props.setProperty("reasonable", "true");
    props.setProperty("supportMethodsArguments", "true");
    props.setProperty("returnPageInfo", "check");
    props.setProperty("params", "count=countSql");
    PageHelper pageHelper = new PageHelper();
    pageHelper.setProperties(props);
    //添加插件
    sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper});
    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
    sqlSessionFactoryBean.setMapperLocations(resolver.getResources(MAPPERXML_LOCATION));
    return sqlSessionFactoryBean.getObject();
}
项目:REST-Web-Services    文件:MovieContributionPersistenceServiceImpl.java   
/**
 * Constructor.
 *
 * @param movieRepository The movie repository to use
 * @param movieInfoRepository The movie info repository to use
 * @param contributionRepository The contribution repository to use
 * @param userRepository The user repository to use
 * @param moviePersistenceService The movie persistence service to use
 * @param storageService The storage service to use
 */
@Autowired
public MovieContributionPersistenceServiceImpl(
        @NotNull final MovieRepository movieRepository,
        @NotNull final MovieInfoRepository movieInfoRepository,
        @NotNull final ContributionRepository contributionRepository,
        @NotNull final UserRepository userRepository,
        @NotNull final MoviePersistenceService moviePersistenceService,
        @Qualifier("googleStorageService") @NotNull final StorageService storageService
) {
    this.movieRepository = movieRepository;
    this.movieInfoRepository = movieInfoRepository;
    this.contributionRepository = contributionRepository;
    this.userRepository = userRepository;
    this.moviePersistenceService = moviePersistenceService;
    this.storageService = storageService;
}
项目:cas-5.1.0    文件:CasValidationConfiguration.java   
@Autowired
@Bean
@ConditionalOnMissingBean(name = "v3ProxyValidateController")
public V3ProxyValidateController v3ProxyValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor,
                                                           @Qualifier("defaultAuthenticationSystemSupport")
                                                           final AuthenticationSystemSupport authenticationSystemSupport) {
    final V3ProxyValidateController c = new V3ProxyValidateController();
    c.setValidationSpecification(cas20ProtocolValidationSpecification);
    c.setSuccessView(cas3ServiceSuccessView());
    c.setFailureView(cas3ServiceFailureView);
    c.setProxyHandler(proxy20Handler);
    c.setAuthenticationSystemSupport(authenticationSystemSupport);
    c.setServicesManager(servicesManager);
    c.setCentralAuthenticationService(centralAuthenticationService);
    c.setArgumentExtractor(argumentExtractor);
    c.setMultifactorTriggerSelectionStrategy(multifactorTriggerSelectionStrategy);
    c.setAuthenticationContextValidator(authenticationContextValidator);
    c.setJsonView(cas3ServiceJsonView());
    c.setAuthnContextAttribute(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute());
    return c;
}
项目:emergentmud    文件:NoiseMap.java   
@Inject
public NoiseMap(@Qualifier("worldSeedElevation") long seedElevation,
                @Qualifier("worldSeedMoisture") long seedMoisture,
                @Qualifier("worldExtent") int worldExtent,
                @Qualifier("worldScale") double worldScale,
                @Qualifier("worldOctaves") int worldOctaves) {

    WORLD_EXTENT = worldExtent;
    HYPOTENUSE = Math.sqrt(Math.pow(WORLD_EXTENT / 2, 2) + Math.pow(WORLD_EXTENT / 2, 2));

    Noise2D noiseElevation = new SimplexNoise();
    Noise2D noiseMoisture = new SimplexNoise();

    ((SimplexNoise)noiseElevation).setSeed(seedElevation);
    ((SimplexNoise)noiseMoisture).setSeed(seedMoisture);

    elevation = new Fbm2D(noiseElevation);
    elevation.setFrequency(worldScale);
    elevation.setOctaves(worldOctaves);

    moisture = new Fbm2D(noiseMoisture);
    moisture.setFrequency(worldScale);
    moisture.setOctaves(worldOctaves);
}
项目:only-short-poc    文件:MySqlSource1Config.java   
@Bean(EntityManagerFactoryBeanName)
@Primary
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
        @Qualifier(DataSourceBeanName) DataSource dataSource,
        @Qualifier(JpaVendorAdapterBeanName) JpaVendorAdapter vendorAdapter) {

    LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
    entityManagerFactoryBean.setDataSource(dataSource);
    entityManagerFactoryBean.setJpaVendorAdapter(vendorAdapter);
    entityManagerFactoryBean.setJpaDialect(new HibernateJpaDialect());
    entityManagerFactoryBean.setPackagesToScan(Organization.class.getPackage().getName());
    entityManagerFactoryBean.setPersistenceUnitName("mysqlsource1");
    entityManagerFactoryBean.afterPropertiesSet();

    return entityManagerFactoryBean;
}
项目:SpringBoot-Study    文件:Read1DruidDataSourceConfig.java   
/**
 * SqlSessionFactory配置
 *
 * @return
 * @throws Exception
 */
@Bean(name = "read1SqlSessionFactory")
public SqlSessionFactory read1SqlSessionFactory(
        @Qualifier("read1DataSource") DataSource dataSource
) throws Exception {
    SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
    sqlSessionFactoryBean.setDataSource(dataSource);

    PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
    // 配置mapper文件位置
    sqlSessionFactoryBean.setMapperLocations(resolver.getResources(read1MapperLocations));

    //配置分页插件
    PageHelper pageHelper = new PageHelper();
    Properties properties = new Properties();
    properties.setProperty("reasonable", "true");
    properties.setProperty("supportMethodsArguments", "true");
    properties.setProperty("returnPageInfo", "check");
    properties.setProperty("params", "count=countSql");
    pageHelper.setProperties(properties);

    //设置插件
    sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper});
    return sqlSessionFactoryBean.getObject();
}
项目:research-graphql    文件:ManualGraphQLQuerySchema.java   
@Bean
@Qualifier("OrderItemType")
public GraphQLObjectType getOrderItemType() {
    return newObject()
            .name("OrderItemDto")
            .field(newFieldDefinition()
                    .name("productId")
                    .type(GraphQLString))
            .field(newFieldDefinition()
                    .name("quantity")
                    .type(GraphQLInt))
            .field(newFieldDefinition()
                    .name("product")
                    .type(getProductType())
                    .dataFetcher(new OrderItemProductFetcher(productAdaptor)))
            .build();
}
项目:lemcloud    文件:ShiroConfig.java   
@Bean(name="shiroFilter")
public ShiroFilterFactoryBean shiroFilter(@Qualifier("securityManager")SecurityManager manager) {
    ShiroFilterFactoryBean bean=new ShiroFilterFactoryBean();
    bean.setSecurityManager(manager);
    //配置登录的url和登录成功的url
    bean.setLoginUrl("/login");
    bean.setSuccessUrl("/home");
    //配置访问权限
    LinkedHashMap<String, String> filterChainDefinitionMap=new LinkedHashMap<>();
    filterChainDefinitionMap.put("/login", "anon"); //表示可以匿名访问
    filterChainDefinitionMap.put("/common/**", "anon"); 
    filterChainDefinitionMap.put("/js/**","anon");
    filterChainDefinitionMap.put("/druid/**","anon");
    filterChainDefinitionMap.put("/captcha","anon");
    filterChainDefinitionMap.put("/**", "authc");//表示需要认证才可以访问
    bean.setFilterChainDefinitionMap(filterChainDefinitionMap);
    return bean;
}
项目:DanmuChat    文件:DataSourceConfig.java   
@Bean
public SqlSessionFactory sqlSessionFactory(@Qualifier("dataSource") DataSource dataSource) throws Exception{
    SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
    sqlSessionFactoryBean.setDataSource(dataSource);
    //bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mybatis/mapper/test1/*.xml"));
    return sqlSessionFactoryBean.getObject();
}
项目:springboot    文件:MasterDataSourceConfig.java   
@Bean(name = "masterSqlSessionFactory")
@Primary
public SqlSessionFactory masterSqlSessionFactory(@Qualifier("masterDataSource") DataSource masterDataSource) throws Exception{
    final SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
    sqlSessionFactoryBean.setDataSource(masterDataSource);
    sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(MasterDataSourceConfig.MAPPER_LOCATION));
    return sqlSessionFactoryBean.getObject();
}
项目:spring-cloud-gcp    文件:StackdriverTraceAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public TraceServiceClient traceServiceClient(
        @Qualifier("traceExecutorProvider") ExecutorProvider executorProvider)
        throws IOException {
    return TraceServiceClient.create(
            TraceServiceSettings.newBuilder()
            .setCredentialsProvider(
                    StackdriverTraceAutoConfiguration.this.finalCredentialsProvider)
            .setExecutorProvider(executorProvider)
            .build());
}
项目:cas-5.1.0    文件:SurrogateWebflowEventResolutionConfiguration.java   
@Bean
public CasWebflowEventResolver surrogateWebflowEventResolver(@Qualifier("defaultAuthenticationSystemSupport") 
                                                                 final AuthenticationSystemSupport authenticationSystemSupport) {
    final CasWebflowEventResolver r = new SurrogateWebflowEventResolver(authenticationSystemSupport, centralAuthenticationService,
            servicesManager, ticketRegistrySupport, warnCookieGenerator,
            authenticationRequestServiceSelectionStrategies,
            selector, surrogateAuthenticationService);
    this.initialAuthenticationAttemptWebflowEventResolver.addDelegate(r);
    return r;
}
项目:xm-uaa    文件:UaaWebSecurityConfiguration.java   
public UaaWebSecurityConfiguration(UserDetailsService userDetailsService,
    AuthenticationManagerBuilder authenticationManagerBuilder,
    @Qualifier("authenticationProviderResolver") AuthenticationProviderResolver authenticationProviderResolver,
    @Lazy PasswordEncoder passwordEncoder) {
    this.userDetailsService = userDetailsService;
    this.authenticationManagerBuilder = authenticationManagerBuilder;
    this.authenticationProviderResolver = authenticationProviderResolver;
    this.passwordEncoder = passwordEncoder;
}
项目:MonitorPlatform    文件:O2iConfigRedisConfig.java   
@Bean(name="o2iConfigJedisPool")
public JedisPool getJedisPool(@Qualifier("o2iConfigJedisPoolConfig") JedisPoolConfig config,   
        @Value("${spring.redis.o2iConfig.host}")String host,   
        @Value("${spring.redis.o2iConfig.port}")int port, 
        @Value("${spring.redis.o2iConfig.timeOut}")int timeOut) {
    return new JedisPool(config, host, port, timeOut);
}
项目:autotest    文件:StudentDataSourceConfig.java   
@Bean(name = "studentSqlSessionFactory")
public SqlSessionFactory studentSqlSessionFactory(@Qualifier("studentDataSource") DataSource studentDataSource)
        throws Exception {
    final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
    sessionFactory.setDataSource(studentDataSource);
    return sessionFactory.getObject();
}
项目:cas-5.1.0    文件:DigestAuthenticationConfiguration.java   
@Autowired
@Bean
public DigestAuthenticationAction digestAuthenticationAction(@Qualifier("defaultDigestCredentialRetriever")
                                                             final DigestHashedCredentialRetriever defaultDigestCredentialRetriever) {
    return new DigestAuthenticationAction(initialAuthenticationAttemptWebflowEventResolver,
            serviceTicketRequestWebflowEventResolver,
            adaptiveAuthenticationPolicy,
            casProperties.getAuthn().getDigest().getRealm(),
            casProperties.getAuthn().getDigest().getAuthenticationMethod(),
            defaultDigestCredentialRetriever);
}
项目:spring-cloud-gcp    文件:ReceiverApplication.java   
@Bean
public PubSubInboundChannelAdapter messageChannelAdapter(
        @Qualifier("pubsubInputChannel") MessageChannel inputChannel,
        PubSubOperations pubSubTemplate) {
    PubSubInboundChannelAdapter adapter =
            new PubSubInboundChannelAdapter(pubSubTemplate, "exampleSubscription");
    adapter.setOutputChannel(inputChannel);
    adapter.setAckMode(AckMode.MANUAL);

    return adapter;
}
项目:MonitorPlatform    文件:MonitorRedisConfig.java   
@Primary
@Bean(name="monitorJedisPool")
public JedisPool getJedisPool(@Qualifier("monitorJedisPoolConfig") JedisPoolConfig config,   
        @Value("${spring.redis.monitor.host}")String host,   
        @Value("${spring.redis.monitor.port}")int port, 
        @Value("${spring.redis.monitor.timeOut}")int timeOut) {
    return new JedisPool(config, host, port, timeOut);
}
项目:Oauth2-Stateless-Authentication-with-Spring-and-JWT-Token    文件:DemoOauth2Application.java   
@Bean @Qualifier("mainDataSource")
public DataSource dataSource(){
    EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
    EmbeddedDatabase db = builder
            .setType(EmbeddedDatabaseType.H2)
            .build();
    return db;
}
项目:research-graphql    文件:ManualGraphQLQuerySchema.java   
@Bean
@Qualifier("UserType")
public GraphQLObjectType getUserType() {
    return newObject()
            .name("UserDto")
            .field(newFieldDefinition()
                    .name("userId")
                    .type(GraphQLID)
                    .dataFetcher(dfe -> ((UserDto) dfe.getSource()).getId()))
            .field(newFieldDefinition()
                    .name("title")
                    .type(GraphQLString))
            .field(newFieldDefinition()
                    .name("firstname")
                    .type(GraphQLString)
                    .dataFetcher(dfe -> ((UserDto) dfe.getSource()).getGivenName()))
            .field(newFieldDefinition()
                    .name("lastname")
                    .type(GraphQLString)
                    .dataFetcher(dfe -> ((UserDto) dfe.getSource()).getFamilyName()))
            .field(newFieldDefinition()
                    .name("email")
                    .type(GraphQLString))
            .field(newFieldDefinition()
                    .name("dob")
                    .type(GraphQLString)
                    .dataFetcher(dfe -> ((UserDto) dfe.getSource()).getBday().toLocalDate().toString()))
            .build();
}
项目:cas-5.1.0    文件:CasCoreConfiguration.java   
@Autowired
@Bean
@ConditionalOnMissingBean(name = "centralAuthenticationService")
public CentralAuthenticationService centralAuthenticationService(
        @Qualifier("authenticationServiceSelectionPlan")
        final AuthenticationServiceSelectionPlan selectionStrategies,
        @Qualifier("principalFactory")
        final PrincipalFactory principalFactory,
        @Qualifier("protocolTicketCipherExecutor")
        final CipherExecutor cipherExecutor) {
    return new DefaultCentralAuthenticationService(ticketRegistry, ticketFactory, servicesManager, logoutManager,
            selectionStrategies, authenticationPolicyFactory(), principalFactory, cipherExecutor);
}
项目:cas-server-4.2.1    文件:Cas30ResponseView.java   
/**
 * Instantiates a new Success.
 * @param view the view
 */
@Autowired
public Success(@Qualifier("cas3JstlSuccessView")
               final AbstractUrlBasedView view) {
    super(view);
    super.setSuccessResponse(true);
}
项目:eventapis    文件:IgniteOperationRepository.java   
@Autowired
public IgniteOperationRepository(@Qualifier("operationIgniteClient") Ignite ignite, KafkaTemplate kafkaTemplate) {
    this.ignite = ignite;
    operationCache = ignite.cache("operationCache");

    this.kafkaTemplate = kafkaTemplate;
}
项目:InfoSys-1D    文件:ProfChoperSecurityConfig.java   
@Autowired
public ProfChoperSecurityConfig(@Qualifier("profChoperDataSource") DataSource dataSource,
                                AccessDeniedHandler accessDeniedHandler,
                                AuthenticationSuccessHandler successHandler) {

    this.dataSource = dataSource;
    this.accessDeniedHandler = accessDeniedHandler;
    this.successHandler = successHandler;
}
项目:springboot-shiro-cas-mybatis    文件:Cas20ResponseView.java   
/**
 * Instantiates a new Success.
 * @param view the view
 */
@Autowired
public Success(@Qualifier("cas2JstlSuccessView")
               final View view) {
    super(view);
    super.setSuccessResponse(true);
}
项目:springboot-shiro-cas-mybatis    文件:Cas30ResponseView.java   
/**
 * Instantiates a new Success.
 * @param view the view
 */
@Autowired
public Success(@Qualifier("cas3JstlSuccessView")
               final AbstractUrlBasedView view) {
    super(view);
    super.setSuccessResponse(true);
}
项目:taboola-cronyx    文件:CronyxAutoConfiguration.java   
@Bean(name = "listenerAdapter")
public TriggerListener listenerAdapter(@Qualifier("listenerRegistry") Registry<String, Pair<ListenerMatcher, FiringListener>> listenerRegistry,
                                       @Qualifier("contextRegistry") Registry<String, CronyxExecutionContext> contextRegistry,
                                       @Qualifier("mainScheduler") Scheduler scheduler,
                                       @Qualifier("jobExecutionContextToFiringContext") JobExecutionContextToFiringContext jobExecutionContextToFiringContext) throws SchedulerException {
    TriggerListener adapter = new QuartzTriggerListenerAdapter(listenerRegistry, contextRegistry, jobExecutionContextToFiringContext);
    scheduler.getListenerManager().addTriggerListener(adapter);
    return adapter;
}
项目:hekate    文件:HekateJdkCodecConfigurer.java   
/**
 * Constructs a new instance of {@link JdkCodecFactory}.
 *
 * @return Codec factory.
 */
@Bean
@Qualifier("default")
@ConfigurationProperties(prefix = "hekate.codec.jdk")
public JdkCodecFactory<Object> jdkCodecFactory() {
    return new JdkCodecFactory<>();
}
项目:cas-5.1.0    文件:CasCookieConfiguration.java   
@Autowired
@Bean
@RefreshScope
public CookieRetrievingCookieGenerator ticketGrantingTicketCookieGenerator(@Qualifier("cookieCipherExecutor") final CipherExecutor cipherExecutor) {
    final TicketGrantingCookieProperties tgc = casProperties.getTgc();
    final int rememberMeMaxAge = Long.valueOf(tgc.getRememberMeMaxAge()).intValue();
    return new TGCCookieRetrievingCookieGenerator(cookieValueManager(cipherExecutor), 
            tgc.getName(),
            tgc.getPath(), tgc.getDomain(),
            rememberMeMaxAge, tgc.isSecure(), 
            tgc.getMaxAge(),
            tgc.isHttpOnly());
}
项目:microservices-tcc-alfa    文件:JwtConfiguration.java   
@Bean
@Qualifier("tokenStore")
public TokenStore tokenStore() {

    System.out.println("Created JwtTokenStore");
    return new JwtTokenStore(jwtTokenEnhancer());
}
项目:springboot-shiro-cas-mybatis    文件:ServiceRegistryInitializer.java   
@Autowired
ServiceRegistryInitializer(@Qualifier("jsonServiceRegistryDao")
                           final ServiceRegistryDao jsonServiceRegistryDao,
                           @Qualifier("serviceRegistryDao")
                           final ServiceRegistryDao serviceRegistryDao) {
    this.jsonServiceRegistryDao = jsonServiceRegistryDao;
    this.serviceRegistryDao = serviceRegistryDao;
}
项目:mafia    文件:DsSlaveConfig.java   
@Bean(name = ConfigConstant.NAME_DS_SSF_SLAVE)
public SqlSessionFactory mafSlaveSqlSessionFactory(@Qualifier(ConfigConstant.NAME_DS_SLAVE) DataSource mafSlaveDataSource) throws Exception {
    logger.info("----- MAFIA slave data source sql session factory INIT -----");
    final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
    sessionFactory.setDataSource(mafSlaveDataSource);
    sessionFactory.setConfigLocation(new ClassPathResource(ConfigConstant.NAME_MYBATIS_CONFIG));
    return sessionFactory.getObject();
}
项目:holon-jdbc    文件:TestSkipAutoConfig.java   
@Bean(name = "dataSource_one")
@Qualifier("custom")
public DataSource dataSource() {
    DefaultBasicDataSource ds = new DefaultBasicDataSource();
    ds.setUrl("jdbc:h2:mem:testdb1");
    ds.setUsername("sa");
    return ds;
}
项目:springboot-shiro-cas-mybatis    文件:MongoAuthenticationHandler.java   
@Autowired(required=false)
@Override
public void setPrincipalNameTransformer(@Qualifier("mongoPrincipalNameTransformer")
                                            final PrincipalNameTransformer principalNameTransformer) {
    if (principalNameTransformer != null) {
        super.setPrincipalNameTransformer(principalNameTransformer);
    }
}
项目:springboot-shiro-cas-mybatis    文件:StormpathAuthenticationHandler.java   
@Autowired(required = false)
@Override
public void setPasswordEncoder(@Qualifier("stormpathPasswordEncoder")
                               final PasswordEncoder passwordEncoder) {
    if (passwordEncoder != null) {
        super.setPasswordEncoder(passwordEncoder);
    }
}
项目:springboot-shiro-cas-mybatis    文件:StormpathAuthenticationHandler.java   
@Autowired(required=false)
@Override
public void setPrincipalNameTransformer(@Qualifier("stormpathPrincipalNameTransformer")
                                        final PrincipalNameTransformer principalNameTransformer) {
    if (principalNameTransformer != null) {
        super.setPrincipalNameTransformer(principalNameTransformer);
    }
}
项目:cas-server-4.2.1    文件:TokenAuthenticationHandler.java   
@Autowired(required=false)
@Override
public final void setPrincipalNameTransformer(@Qualifier("tokenPrincipalNameTransformer")
                                        final PrincipalNameTransformer principalNameTransformer) {
    if (principalNameTransformer != null) {
        super.setPrincipalNameTransformer(principalNameTransformer);
    }
}
项目:cas-5.1.0    文件:GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration.java   
@ConditionalOnProperty(prefix = "cas.authn.mfa.gauth.cleaner", name = "enabled", havingValue = "true", matchIfMissing = true)
@Bean
@Autowired
public OneTimeTokenRepositoryCleaner googleAuthenticatorTokenRepositoryCleaner(@Qualifier("oneTimeTokenAuthenticatorTokenRepository")
                                                                               final OneTimeTokenRepository oneTimeTokenAuthenticatorTokenRepository) {
    return new GoogleAuthenticatorOneTimeTokenRepositoryCleaner(oneTimeTokenAuthenticatorTokenRepository);
}
项目:mybatis-dao    文件:MybatisDaoConfig.java   
@Bean(name = "dao")
  @Primary
  public Dao dao(@Qualifier("daoMapper")DaoMapper daoMapper) throws Exception {

return new Dao(daoMapper,new DaoConfig() {

    @Override
    public DataBase getDataBase() {
        // TODO Auto-generated method stub
        return DataBase.MYSQL;
    }

});
  }