當前位置: 首頁>>代碼示例>>Java>>正文


Java Autowired類代碼示例

本文整理匯總了Java中org.springframework.beans.factory.annotation.Autowired的典型用法代碼示例。如果您正苦於以下問題:Java Autowired類的具體用法?Java Autowired怎麽用?Java Autowired使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Autowired類屬於org.springframework.beans.factory.annotation包,在下文中一共展示了Autowired類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AccessCertificateCtrl

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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);
}
 
開發者ID:amvnetworks,項目名稱:amv-access-api-poc,代碼行數:14,代碼來源:AccessCertificateCtrl.java

示例2: DefaultCalendarService

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-Security-Third-Edition,代碼行數:18,代碼來源:DefaultCalendarService.java

示例3:

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:22,代碼來源:CasValidationConfiguration.java

示例4: DefaultCalendarService

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-Security-Third-Edition,代碼行數:22,代碼來源:DefaultCalendarService.java

示例5: JpaCalendarUserDao

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-Security-Third-Edition,代碼行數:14,代碼來源:JpaCalendarUserDao.java

示例6: setKerberosConf

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
/**
 * 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);
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:springboot-shiro-cas-mybatis,代碼行數:13,代碼來源:JcifsConfig.java

示例7: ViewTransformation

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@Autowired
public ViewTransformation(
    HiveConf replicaHiveConf,
    HqlTranslator hqlTranslator,
    Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier) {
  this.replicaHiveConf = replicaHiveConf;
  this.hqlTranslator = hqlTranslator;
  this.replicaMetaStoreClientSupplier = replicaMetaStoreClientSupplier;
}
 
開發者ID:HotelsDotCom,項目名稱:circus-train,代碼行數:10,代碼來源:ViewTransformation.java

示例8: JdbcCalendarUserDao

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@Autowired
public JdbcCalendarUserDao(JdbcOperations jdbcOperations) {
    if (jdbcOperations == null) {
        throw new IllegalArgumentException("jdbcOperations cannot be null");
    }
    this.jdbcOperations = jdbcOperations;
}
 
開發者ID:PacktPublishing,項目名稱:Spring-Security-Third-Edition,代碼行數:8,代碼來源:JdbcCalendarUserDao.java

示例9: ProfCalendarController

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@Autowired
public ProfCalendarController(WeekCalendarService weekCalendarService,
                              ProfessorService professorService, ProfChoperAuthFacade authFacade,
                              BookingSlotService bookingSlotService) {

    this.weekCalendarService = weekCalendarService;
    this.professorService = professorService;
    this.bookingSlotService = bookingSlotService;
    this.authFacade = authFacade;
}
 
開發者ID:ericywl,項目名稱:InfoSys-1D,代碼行數:11,代碼來源:ProfCalendarController.java

示例10: OrganizationController

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@Autowired
public OrganizationController(
        @Qualifier(MySqlSource1Config.RepositoryBeanName) OrganizationRepository organizationRepositoryFromSource1,
        @Qualifier(MySqlSource2Config.RepositoryBeanName) OrganizationRepository organizationRepositoryFromSource2) {

    this.organizationRepositoryFromSource1 = organizationRepositoryFromSource1;
    this.organizationRepositoryFromSource2 = organizationRepositoryFromSource2;
}
 
開發者ID:omacarena,項目名稱:only-short-poc,代碼行數:9,代碼來源:OrganizationController.java

示例11: setJcifsNetbiosWins

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
/**
 * @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);
    }
}
 
開發者ID:yuweijun,項目名稱:cas-server-4.2.1,代碼行數:12,代碼來源:JcifsConfig.java

示例12: tarantoolClient

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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);
}
 
開發者ID:saladinkzn,項目名稱:spring-data-tarantool,代碼行數:13,代碼來源:TarantoolOperationsTests.java

示例13: ScheduledFileReader

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@Autowired
public ScheduledFileReader(PathValidator pathValidator, EntriesXmlParser xmlParser,
                           DocumentService service) {
  this.pathValidator = pathValidator;
  this.xmlParser = xmlParser;
  this.service = service;
}
 
開發者ID:durimkryeziu,項目名稱:family-tree-xml-parser,代碼行數:8,代碼來源:ScheduledFileReader.java

示例14: setEthereumListener

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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;
            }
        }
    });
}
 
開發者ID:Aptoide,項目名稱:AppCoins-ethereumj,代碼行數:14,代碼來源:DbFlushManager.java

示例15: setConfigurers

import org.springframework.beans.factory.annotation.Autowired; //導入依賴的package包/類
@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);
		}
	}
}
 
開發者ID:ralscha,項目名稱:wamp2spring,代碼行數:12,代碼來源:WampConfiguration.java


注:本文中的org.springframework.beans.factory.annotation.Autowired類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。