Java Code Examples for org.springframework.beans.factory.annotation.Qualifier

The following are top voted examples for showing how to use org.springframework.beans.factory.annotation.Qualifier. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: busi-support   File: BusinessDatabaseConfig.java   View source code 7 votes vote down vote up
@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();
}
 
Example 2
Project: only-short-poc   File: MySqlSource1Config.java   View source code 7 votes vote down vote up
@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;
}
 
Example 3
Project: lemcloud   File: ShiroConfig.java   View source code 7 votes vote down vote up
@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;
}
 
Example 4
Project: springbootWeb   File: BusinessDatabaseConfig.java   View source code 6 votes vote down vote up
@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();
}
 
Example 5
Project: REST-Web-Services   File: MovieContributionPersistenceServiceImpl.java   View source code 6 votes vote down vote up
/**
 * 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;
}
 
Example 6
Project: cas-5.1.0   File: CasValidationConfiguration.java   View source code 6 votes vote down vote up
@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;
}
 
Example 7
Project: emergentmud   File: NoiseMap.java   View source code 6 votes vote down vote up
@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);
}
 
Example 8
Project: SpringBoot-Study   File: Read1DruidDataSourceConfig.java   View source code 6 votes vote down vote up
/**
 * 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();
}
 
Example 9
Project: research-graphql   File: ManualGraphQLQuerySchema.java   View source code 6 votes vote down vote up
@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();
}
 
Example 10
Project: DanmuChat   File: DataSourceConfig.java   View source code 5 votes vote down vote up
@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();
}
 
Example 11
Project: springboot   File: MasterDataSourceConfig.java   View source code 5 votes vote down vote up
@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();
}
 
Example 12
Project: spring-cloud-gcp   File: StackdriverTraceAutoConfiguration.java   View source code 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public TraceServiceClient traceServiceClient(
		@Qualifier("traceExecutorProvider") ExecutorProvider executorProvider)
		throws IOException {
	return TraceServiceClient.create(
			TraceServiceSettings.newBuilder()
			.setCredentialsProvider(
					StackdriverTraceAutoConfiguration.this.finalCredentialsProvider)
			.setExecutorProvider(executorProvider)
			.build());
}
 
Example 13
Project: cas-5.1.0   File: SurrogateWebflowEventResolutionConfiguration.java   View source code 5 votes vote down vote up
@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;
}
 
Example 14
Project: xm-uaa   File: UaaWebSecurityConfiguration.java   View source code 5 votes vote down vote up
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;
}
 
Example 15
Project: MonitorPlatform   File: O2iConfigRedisConfig.java   View source code 5 votes vote down vote up
@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);
}
 
Example 16
Project: autotest   File: StudentDataSourceConfig.java   View source code 5 votes vote down vote up
@Bean(name = "studentSqlSessionFactory")
public SqlSessionFactory studentSqlSessionFactory(@Qualifier("studentDataSource") DataSource studentDataSource)
		throws Exception {
	final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
	sessionFactory.setDataSource(studentDataSource);
	return sessionFactory.getObject();
}
 
Example 17
Project: cas-5.1.0   File: DigestAuthenticationConfiguration.java   View source code 5 votes vote down vote up
@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);
}
 
Example 18
Project: spring-cloud-gcp   File: ReceiverApplication.java   View source code 5 votes vote down vote up
@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;
}
 
Example 19
Project: MonitorPlatform   File: MonitorRedisConfig.java   View source code 5 votes vote down vote up
@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);
}
 
Example 20
Project: Oauth2-Stateless-Authentication-with-Spring-and-JWT-Token   File: DemoOauth2Application.java   View source code 5 votes vote down vote up
@Bean @Qualifier("mainDataSource")
public DataSource dataSource(){
	EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
	EmbeddedDatabase db = builder
			.setType(EmbeddedDatabaseType.H2)
			.build();
	return db;
}
 
Example 21
Project: research-graphql   File: ManualGraphQLQuerySchema.java   View source code 5 votes vote down vote up
@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();
}
 
Example 22
Project: cas-5.1.0   File: CasCoreConfiguration.java   View source code 5 votes vote down vote up
@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);
}
 
Example 23
Project: cas-server-4.2.1   File: Cas30ResponseView.java   View source code 5 votes vote down vote up
/**
 * Instantiates a new Success.
 * @param view the view
 */
@Autowired
public Success(@Qualifier("cas3JstlSuccessView")
               final AbstractUrlBasedView view) {
    super(view);
    super.setSuccessResponse(true);
}
 
Example 24
Project: eventapis   File: IgniteOperationRepository.java   View source code 5 votes vote down vote up
@Autowired
public IgniteOperationRepository(@Qualifier("operationIgniteClient") Ignite ignite, KafkaTemplate kafkaTemplate) {
    this.ignite = ignite;
    operationCache = ignite.cache("operationCache");

    this.kafkaTemplate = kafkaTemplate;
}
 
Example 25
Project: InfoSys-1D   File: ProfChoperSecurityConfig.java   View source code 5 votes vote down vote up
@Autowired
public ProfChoperSecurityConfig(@Qualifier("profChoperDataSource") DataSource dataSource,
                                AccessDeniedHandler accessDeniedHandler,
                                AuthenticationSuccessHandler successHandler) {

    this.dataSource = dataSource;
    this.accessDeniedHandler = accessDeniedHandler;
    this.successHandler = successHandler;
}
 
Example 26
Project: springboot-shiro-cas-mybatis   File: Cas20ResponseView.java   View source code 5 votes vote down vote up
/**
 * Instantiates a new Success.
 * @param view the view
 */
@Autowired
public Success(@Qualifier("cas2JstlSuccessView")
               final View view) {
    super(view);
    super.setSuccessResponse(true);
}
 
Example 27
Project: springboot-shiro-cas-mybatis   File: Cas30ResponseView.java   View source code 5 votes vote down vote up
/**
 * Instantiates a new Success.
 * @param view the view
 */
@Autowired
public Success(@Qualifier("cas3JstlSuccessView")
               final AbstractUrlBasedView view) {
    super(view);
    super.setSuccessResponse(true);
}
 
Example 28
Project: taboola-cronyx   File: CronyxAutoConfiguration.java   View source code 5 votes vote down vote up
@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;
}
 
Example 29
Project: hekate   File: HekateJdkCodecConfigurer.java   View source code 5 votes vote down vote up
/**
 * 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<>();
}
 
Example 30
Project: cas-5.1.0   File: CasCookieConfiguration.java   View source code 5 votes vote down vote up
@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());
}
 
Example 31
Project: microservices-tcc-alfa   File: JwtConfiguration.java   View source code 5 votes vote down vote up
@Bean
@Qualifier("tokenStore")
public TokenStore tokenStore() {

    System.out.println("Created JwtTokenStore");
    return new JwtTokenStore(jwtTokenEnhancer());
}
 
Example 32
Project: springboot-shiro-cas-mybatis   File: ServiceRegistryInitializer.java   View source code 5 votes vote down vote up
@Autowired
ServiceRegistryInitializer(@Qualifier("jsonServiceRegistryDao")
                           final ServiceRegistryDao jsonServiceRegistryDao,
                           @Qualifier("serviceRegistryDao")
                           final ServiceRegistryDao serviceRegistryDao) {
    this.jsonServiceRegistryDao = jsonServiceRegistryDao;
    this.serviceRegistryDao = serviceRegistryDao;
}
 
Example 33
Project: mafia   File: DsSlaveConfig.java   View source code 5 votes vote down vote up
@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();
}
 
Example 34
Project: holon-jdbc   File: TestSkipAutoConfig.java   View source code 5 votes vote down vote up
@Bean(name = "dataSource_one")
@Qualifier("custom")
public DataSource dataSource() {
	DefaultBasicDataSource ds = new DefaultBasicDataSource();
	ds.setUrl("jdbc:h2:mem:testdb1");
	ds.setUsername("sa");
	return ds;
}
 
Example 35
Project: springboot-shiro-cas-mybatis   File: MongoAuthenticationHandler.java   View source code 5 votes vote down vote up
@Autowired(required=false)
@Override
public void setPrincipalNameTransformer(@Qualifier("mongoPrincipalNameTransformer")
                                            final PrincipalNameTransformer principalNameTransformer) {
    if (principalNameTransformer != null) {
        super.setPrincipalNameTransformer(principalNameTransformer);
    }
}
 
Example 36
Project: springboot-shiro-cas-mybatis   File: StormpathAuthenticationHandler.java   View source code 5 votes vote down vote up
@Autowired(required = false)
@Override
public void setPasswordEncoder(@Qualifier("stormpathPasswordEncoder")
                               final PasswordEncoder passwordEncoder) {
    if (passwordEncoder != null) {
        super.setPasswordEncoder(passwordEncoder);
    }
}
 
Example 37
Project: springboot-shiro-cas-mybatis   File: StormpathAuthenticationHandler.java   View source code 5 votes vote down vote up
@Autowired(required=false)
@Override
public void setPrincipalNameTransformer(@Qualifier("stormpathPrincipalNameTransformer")
                                        final PrincipalNameTransformer principalNameTransformer) {
    if (principalNameTransformer != null) {
        super.setPrincipalNameTransformer(principalNameTransformer);
    }
}
 
Example 38
Project: cas-server-4.2.1   File: TokenAuthenticationHandler.java   View source code 5 votes vote down vote up
@Autowired(required=false)
@Override
public final void setPrincipalNameTransformer(@Qualifier("tokenPrincipalNameTransformer")
                                        final PrincipalNameTransformer principalNameTransformer) {
    if (principalNameTransformer != null) {
        super.setPrincipalNameTransformer(principalNameTransformer);
    }
}
 
Example 39
Project: cas-5.1.0   File: GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration.java   View source code 5 votes vote down vote up
@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);
}
 
Example 40
Project: mybatis-dao   File: MybatisDaoConfig.java   View source code 5 votes vote down vote up
@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;
	}

});
  }