当前位置: 首页>>代码示例>>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;未经允许,请勿转载。