本文整理匯總了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}
}
});
}
示例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);
}
}
}