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

项目:amv-access-api-poc    文件:AccessCertificateCtrl.java   
@Autowired
public AccessCertificateCtrl(
        Environment environment,
        DemoService demoService,
        IssuerService issuerService,
        CreateAccessCertificateRequestValidator createAccessCertificateRequestValidator,
        AccessCertificateService accessCertificateService) {
    this.environment = requireNonNull(environment);
    this.demoService = requireNonNull(demoService);
    this.issuerService = requireNonNull(issuerService);
    this.createAccessCertificateRequestValidator = requireNonNull(createAccessCertificateRequestValidator);
    this.accessCertificateService = requireNonNull(accessCertificateService);
}
项目:Spring-Security-Third-Edition    文件:DefaultCalendarService.java   
@Autowired
public DefaultCalendarService(final EventDao eventDao,
                              final CalendarUserDao userDao,
                              final PasswordEncoder passwordEncoder) {
    if (eventDao == null) {
        throw new IllegalArgumentException("eventDao cannot be null");
    }
    if (userDao == null) {
        throw new IllegalArgumentException("userDao cannot be null");
    }
    if (passwordEncoder == null) {
        throw new IllegalArgumentException("passwordEncoder cannot be null");
    }
    this.eventDao = eventDao;
    this.userDao = userDao;
    this.passwordEncoder = passwordEncoder;
}
项目:cas-5.1.0    文件:CasValidationConfiguration.java   
@Autowired
@Bean
@ConditionalOnMissingBean(name = "v3ServiceValidateController")
public V3ServiceValidateController v3ServiceValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor,
                                                               @Qualifier("defaultAuthenticationSystemSupport")
                                                               final AuthenticationSystemSupport authenticationSystemSupport) {
    final V3ServiceValidateController c = new V3ServiceValidateController();
    c.setValidationSpecification(this.cas20WithoutProxyProtocolValidationSpecification);
    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;
}
项目:Spring-Security-Third-Edition    文件:DefaultCalendarService.java   
@Autowired
public DefaultCalendarService(final EventDao eventDao,
                              final CalendarUserDao userDao,
                              final CalendarUserRepository userRepository,
                              final PasswordEncoder passwordEncoder) {
    if (eventDao == null) {
        throw new IllegalArgumentException("eventDao cannot be null");
    }
    if (userDao == null) {
        throw new IllegalArgumentException("userDao cannot be null");
    }
    if (userRepository == null) {
        throw new IllegalArgumentException("userRepository cannot be null");
    }
    if (passwordEncoder == null) {
        throw new IllegalArgumentException("passwordEncoder cannot be null");
    }
    this.eventDao = eventDao;
    this.userDao = userDao;
    this.passwordEncoder = passwordEncoder;
}
项目:Spring-Security-Third-Edition    文件:JpaCalendarUserDao.java   
@Autowired
public JpaCalendarUserDao(final CalendarUserRepository repository,
                          final RoleRepository roleRepository) {
    if (repository == null) {
        throw new IllegalArgumentException("repository cannot be null");
    }
    if (roleRepository == null) {
        throw new IllegalArgumentException("roleRepository cannot be null");
    }

    this.userRepository = repository;
    this.roleRepository = roleRepository;
}
项目:springboot-shiro-cas-mybatis    文件:JcifsConfig.java   
/**
 * Sets the kerberos conf.
 *
 * @param kerberosConf the new kerberos conf
 */
@Autowired
public void setKerberosConf(@Value("${cas.spnego.kerb.conf:}") final String kerberosConf) {
    if (StringUtils.isNotBlank(kerberosConf)) {
        logger.debug("kerberosConf is set to :{}", kerberosConf);
        System.setProperty(SYS_PROP_KERBEROS_CONF, kerberosConf);
    }
}
项目:cas-5.1.0    文件:CasValidationConfiguration.java   
@Autowired
@Bean
@ConditionalOnMissingBean(name = "legacyValidateController")
public LegacyValidateController legacyValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor,
                                                         @Qualifier("defaultAuthenticationSystemSupport")
                                                         final AuthenticationSystemSupport authenticationSystemSupport) {
    final LegacyValidateController c = new LegacyValidateController();
    c.setValidationSpecification(this.cas10ProtocolValidationSpecification);
    c.setSuccessView(cas1ServiceSuccessView());
    c.setFailureView(cas1ServiceFailureView());
    c.setProxyHandler(proxy10Handler);
    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;
}
项目:circus-train    文件:ViewTransformation.java   
@Autowired
public ViewTransformation(
    HiveConf replicaHiveConf,
    HqlTranslator hqlTranslator,
    Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier) {
  this.replicaHiveConf = replicaHiveConf;
  this.hqlTranslator = hqlTranslator;
  this.replicaMetaStoreClientSupplier = replicaMetaStoreClientSupplier;
}
项目:Spring-Security-Third-Edition    文件:JdbcCalendarUserDao.java   
@Autowired
public JdbcCalendarUserDao(JdbcOperations jdbcOperations) {
    if (jdbcOperations == null) {
        throw new IllegalArgumentException("jdbcOperations cannot be null");
    }
    this.jdbcOperations = jdbcOperations;
}
项目:InfoSys-1D    文件:ProfCalendarController.java   
@Autowired
public ProfCalendarController(WeekCalendarService weekCalendarService,
                              ProfessorService professorService, ProfChoperAuthFacade authFacade,
                              BookingSlotService bookingSlotService) {

    this.weekCalendarService = weekCalendarService;
    this.professorService = professorService;
    this.bookingSlotService = bookingSlotService;
    this.authFacade = authFacade;
}
项目:only-short-poc    文件:OrganizationController.java   
@Autowired
public OrganizationController(
        @Qualifier(MySqlSource1Config.RepositoryBeanName) OrganizationRepository organizationRepositoryFromSource1,
        @Qualifier(MySqlSource2Config.RepositoryBeanName) OrganizationRepository organizationRepositoryFromSource2) {

    this.organizationRepositoryFromSource1 = organizationRepositoryFromSource1;
    this.organizationRepositoryFromSource2 = organizationRepositoryFromSource2;
}
项目:cas-server-4.2.1    文件:JcifsConfig.java   
/**
 * @param jcifsNetbiosWins the jcifsNetbiosWins to set
 */
@Autowired
public void setJcifsNetbiosWins(@Value("${cas.spnego.jcifs.netbios.wins:}")
                                final String jcifsNetbiosWins) {
    if (StringUtils.isNotBlank(jcifsNetbiosWins)) {
        logger.debug("jcifsNetbiosWins is set to {}", jcifsNetbiosWins);
        Config.setProperty(JCIFS_PROP_NETBIOS_WINS, jcifsNetbiosWins);
    }
}
项目:spring-data-tarantool    文件:TarantoolOperationsTests.java   
@Bean
@Autowired
public TarantoolClient tarantoolClient(
        SocketChannelProvider socketChannelProvider
) {
    final TarantoolClientConfig config = new TarantoolClientConfig();
    config.username = "test";
    config.password = "test";
    config.initTimeoutMillis = 5000;
    config.writeTimeoutMillis = 5000;
    return new TarantoolClientImpl(socketChannelProvider, config);
}
项目:family-tree-xml-parser    文件:ScheduledFileReader.java   
@Autowired
public ScheduledFileReader(PathValidator pathValidator, EntriesXmlParser xmlParser,
                           DocumentService service) {
  this.pathValidator = pathValidator;
  this.xmlParser = xmlParser;
  this.service = service;
}
项目:AppCoins-ethereumj    文件:DbFlushManager.java   
@Autowired
public void setEthereumListener(CompositeEthereumListener listener) {
    if (!flushAfterSyncDone) return;
    listener.addListener(new EthereumListenerAdapter() {
        @Override
        public void onSyncDone(SyncState state) {
            if (state == SyncState.COMPLETE) {
                logger.info("DbFlushManager: long sync done, flushing each block now");
                syncDone = true;
            }
        }
    });
}
项目:wamp2spring    文件:WampConfiguration.java   
@Autowired(required = false)
public void setConfigurers(List<WampConfigurer> configurers) {
    if (!CollectionUtils.isEmpty(configurers)) {
        this.configurers.addAll(configurers);

        configureFeatures(this.features);
        for (WampConfigurer wc : this.configurers) {
            wc.configureFeatures(this.features);
        }
    }
}
项目:Spring-Security-Third-Edition    文件:DefaultCalendarService.java   
@Autowired
    public DefaultCalendarService(final EventDao eventDao,
                                  final CalendarUserDao userDao,
                                  final CalendarUserRepository userRepository
//                                  final PasswordEncoder passwordEncoder
    ) {
        if (eventDao == null) {
            throw new IllegalArgumentException("eventDao cannot be null");
        }
        if (userDao == null) {
            throw new IllegalArgumentException("userDao cannot be null");
        }
        if (userRepository == null) {
            throw new IllegalArgumentException("userRepository cannot be null");
        }
//        if (passwordEncoder == null) {
//            throw new IllegalArgumentException("passwordEncoder cannot be null");
//        }
        this.eventDao = eventDao;
        this.userDao = userDao;
//        this.passwordEncoder = passwordEncoder;
    }
项目:cas-server-4.2.1    文件:StormpathAuthenticationHandler.java   
@Autowired(required = false)
@Override
public void setPasswordEncoder(@Qualifier("stormpathPasswordEncoder")
                               final PasswordEncoder passwordEncoder) {
    if (passwordEncoder != null) {
        super.setPasswordEncoder(passwordEncoder);
    }
}
项目:jeeves    文件:WechatHttpServiceInternal.java   
@Autowired
WechatHttpServiceInternal(RestTemplate restTemplate, @Value("${wechat.ua}") String BROWSER_DEFAULT_USER_AGENT) {
    this.restTemplate = restTemplate;
    this.postHeader = new HttpHeaders();
    postHeader.set(HttpHeaders.USER_AGENT, BROWSER_DEFAULT_USER_AGENT);
    postHeader.set(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.toString());
    postHeader.setAccept(Arrays.asList(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.ALL));
    postHeader.set(HttpHeaders.ACCEPT_LANGUAGE, BROWSER_DEFAULT_ACCEPT_LANGUAGE);
    postHeader.set(HttpHeaders.ACCEPT_ENCODING, BROWSER_DEFAULT_ACCEPT_ENCODING);
    this.getHeader = new HttpHeaders();
    getHeader.set(HttpHeaders.USER_AGENT, BROWSER_DEFAULT_USER_AGENT);
    getHeader.set(HttpHeaders.ACCEPT_LANGUAGE, BROWSER_DEFAULT_ACCEPT_LANGUAGE);
    getHeader.set(HttpHeaders.ACCEPT_ENCODING, BROWSER_DEFAULT_ACCEPT_ENCODING);
}
项目:Spring-Security-Third-Edition    文件:SpringSecurityUserContext.java   
@Autowired
public SpringSecurityUserContext(CalendarService calendarService,UserDetailsService userDetailsService) {
    if (calendarService == null) {
        throw new IllegalArgumentException("calendarService cannot be null");
    }
    if (userDetailsService == null) {
        throw new IllegalArgumentException("userDetailsService cannot be null");
    }
    this.calendarService = calendarService;
    this.userDetailsService = userDetailsService;
}
项目:Spring-Security-Third-Edition    文件:CalendarUserAuthenticationProvider.java   
@Autowired
public CalendarUserAuthenticationProvider(final CalendarService calendarService,
                                          final PasswordEncoder passwordEncoder) {
    if (calendarService == null) {
        throw new IllegalArgumentException("calendarService cannot be null");
    }
    if (passwordEncoder == null) {
        throw new IllegalArgumentException("passwordEncoder cannot be null");
    }

    this.calendarService = calendarService;
    this.passwordEncoder = passwordEncoder;
}
项目:nifi-registry    文件:ItemResource.java   
@Autowired
public ItemResource(
        final RegistryService registryService,
        final LinkService linkService,
        final PermissionsService permissionsService,
        final AuthorizationService authorizationService,
        final Authorizer authorizer) {
    super(authorizer, authorizationService);
    this.registryService = registryService;
    this.linkService = linkService;
    this.permissionsService = permissionsService;
}
项目:Spring-Security-Third-Edition    文件:CalendarUserDetailsService.java   
@Autowired
public CalendarUserDetailsService(CalendarUserDao calendarUserDao) {
    if (calendarUserDao == null) {
        throw new IllegalArgumentException("calendarUserDao cannot be null");
    }
    this.calendarUserDao = calendarUserDao;
}
项目:Spring-Security-Third-Edition    文件:SpringSecurityUserContext.java   
@Autowired
public SpringSecurityUserContext(CalendarService calendarService,UserDetailsService userDetailsService) {
    if (calendarService == null) {
        throw new IllegalArgumentException("calendarService cannot be null");
    }
    if (userDetailsService == null) {
        throw new IllegalArgumentException("userDetailsService cannot be null");
    }
    this.calendarService = calendarService;
    this.userDetailsService = userDetailsService;
}
项目:Spring-Security-Third-Edition    文件:JpaEventDao.java   
@Autowired
public JpaEventDao(EventRepository repository) {
    if (repository == null) {
        throw new IllegalArgumentException("repository cannot be null");
    }
    this.repository = repository;
}
项目:Spring-Security-Third-Edition    文件:JdbcCalendarUserDao.java   
@Autowired
public JdbcCalendarUserDao(JdbcOperations jdbcOperations) {
    if (jdbcOperations == null) {
        throw new IllegalArgumentException("jdbcOperations cannot be null");
    }
    this.jdbcOperations = jdbcOperations;
}
项目:REST-Web-Services    文件:MovieRestController.java   
/**
 * Constructor.
 *
 * @param moviePersistenceService The movie persistence service to use
 * @param movieSearchService The movie search service to use
 * @param authorizationService The authorization service to use
 * @param movieResourceAssembler Assemble movie resources out of movies
 * @param movieSearchResultResourceAssembler Assemble movie search resources out of movies
 */
@Autowired
public MovieRestController(
        final MoviePersistenceService moviePersistenceService,
        final MovieSearchService movieSearchService,
        final AuthorizationService authorizationService,
        final MovieResourceAssembler movieResourceAssembler,
        final MovieSearchResultResourceAssembler movieSearchResultResourceAssembler
) {
    this.moviePersistenceService = moviePersistenceService;
    this.movieSearchService = movieSearchService;
    this.authorizationService = authorizationService;
    this.movieResourceAssembler = movieResourceAssembler;
    this.movieSearchResultResourceAssembler = movieSearchResultResourceAssembler;
}
项目:Spring-Security-Third-Edition    文件:UserContextStub.java   
@Autowired
public UserContextStub(CalendarUserDao userService) {
    if (userService == null) {
        throw new IllegalArgumentException("userService cannot be null");
    }
    this.userService = userService;
}
项目:Spring-Security-Third-Edition    文件:JdbcEventDao.java   
@Autowired
public JdbcEventDao(JdbcOperations jdbcOperations) {
    if (jdbcOperations == null) {
        throw new IllegalArgumentException("jdbcOperations cannot be null");
    }
    this.jdbcOperations = jdbcOperations;
}
项目:Spring-Security-Third-Edition    文件:JpaCalendarUserDao.java   
@Autowired
public JpaCalendarUserDao(final CalendarUserRepository repository,
                          final RoleRepository roleRepository) {
    if (repository == null) {
        throw new IllegalArgumentException("repository cannot be null");
    }
    if (roleRepository == null) {
        throw new IllegalArgumentException("roleRepository cannot be null");
    }

    this.userRepository = repository;
    this.roleRepository = roleRepository;
}
项目:jkes    文件:EsRestClient.java   
@Autowired
public EsRestClient(JkesSearchProperties jkesProperties) {
    SniffOnFailureListener sniffOnFailureListener = new SniffOnFailureListener();
    Header[] defaultHeaders = {new BasicHeader("Content-Type", "application/json")};

    String[] urls = jkesProperties.getEs().getServers().split("\\s*,");
    HttpHost[] hosts = new HttpHost[urls.length];
    for (int i = 0; i < urls.length; i++) {
        hosts[i] = HttpHost.create(urls[i]);
    }

    RestClient restClient = RestClient.builder(hosts)
            .setRequestConfigCallback(requestConfigBuilder -> {
                return requestConfigBuilder.setConnectTimeout(5000) // default 1s
                        .setSocketTimeout(60000); // defaults to 30 seconds
            }).setHttpClientConfigCallback(httpClientBuilder -> {
                return httpClientBuilder.setDefaultIOReactorConfig(
                        IOReactorConfig.custom().setIoThreadCount(2).build()); // because only used for admin, so not necessary to hold many worker threads
            })
            .setMaxRetryTimeoutMillis(60000) // defaults to 30 seconds
            .setDefaultHeaders(defaultHeaders)
            .setFailureListener(sniffOnFailureListener)
            .build();

    Sniffer sniffer = Sniffer.builder(restClient).build();
    sniffOnFailureListener.setSniffer(sniffer);

    this.sniffer = sniffer;
    this.restClient = restClient;
}
项目:Spring-Security-Third-Edition    文件:CalendarUserDetailsService.java   
@Autowired
public CalendarUserDetailsService(CalendarUserDao calendarUserDao) {
    if (calendarUserDao == null) {
        throw new IllegalArgumentException("calendarUserDao cannot be null");
    }
    this.calendarUserDao = calendarUserDao;
}
项目:Armory    文件:MetricsConfiguration.java   
@Autowired(required = false)
public void setHikariDataSource(HikariDataSource hikariDataSource) {
    this.hikariDataSource = hikariDataSource;
}
项目:recruitervision    文件:EndFileController.java   
@Autowired
public EndFileController(ScreensManager screensManager, PDFCreator pdfCreator, JSONCreator jsonCreator) {
    this.screensManager = screensManager;
    this.pdfCreator = pdfCreator;
    this.jsonCreator = jsonCreator;
}
项目:jigsaw-payment    文件:IdServerConfiguration.java   
@Bean
@Autowired
public RedisTemplate redisTemplate(ShardedJedisPool shardedJedisPool){
    return new RedisTemplate(shardedJedisPool);
}
项目:ARCLib    文件:ReportForms.java   
@Autowired(required = false)
public void setForms(List<ReportForm> forms) {
    this.forms = forms != null ? forms : emptyList();
}
项目:sentry    文件:SettingService.java   
@Autowired
public SettingService(SettingRepository settingRepository, SettingMapper settingMapper,
                      SentryProperties sentryProperties) {
    this.settingRepository = settingRepository;
    this.settingMapper = settingMapper;
    this.sentryProperties = sentryProperties;
}
项目:mafia    文件:I18nUtil.java   
@Autowired
public void setMessageSource(MessageSource messageSource) {
    I18nUtil.messageSource = messageSource;
}
项目:yum    文件:AuthApiController.java   
@Autowired
public AuthApiController(AuthService authService) {
    this.authService = authService;           

}
项目:ARCLib    文件:NotificationService.java   
@Autowired(required = false)
public void setUserDetails(UserDetails userDetails) {
    this.userDetails = userDetails;
}