use of org.springframework.beans.factory.annotation.Autowired in project uPortal by Jasig.
the class RDBMUserLayoutStore method setPlatformTransactionManager.
@Autowired
public void setPlatformTransactionManager(@Qualifier(BasePortalJpaDao.PERSISTENCE_UNIT_NAME) PlatformTransactionManager platformTransactionManager) {
transactionOperations = new TransactionTemplate(platformTransactionManager);
final DefaultTransactionDefinition nextStructTransactionDefinition = new DefaultTransactionDefinition();
nextStructTransactionDefinition.setPropagationBehavior(DefaultTransactionDefinition.PROPAGATION_REQUIRES_NEW);
nextStructTransactionOperations = new TransactionTemplate(platformTransactionManager, nextStructTransactionDefinition);
}
use of org.springframework.beans.factory.annotation.Autowired in project oc-explorer by devgateway.
the class WebSecurityConfig method configureGlobal.
@Autowired
public void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception {
// we use standard password encoder for all passwords
StandardPasswordEncoder spe = new StandardPasswordEncoder();
auth.userDetailsService(customJPAUserDetailsService).passwordEncoder(spe);
}
use of org.springframework.beans.factory.annotation.Autowired in project spring-data-mongodb by spring-projects.
the class MongoTemplateTests method setMongo.
@Autowired
public void setMongo(Mongo mongo) throws Exception {
CustomConversions conversions = new MongoCustomConversions(Arrays.asList(DateToDateTimeConverter.INSTANCE, DateTimeToDateConverter.INSTANCE));
MongoMappingContext mappingContext = new MongoMappingContext();
mappingContext.setInitialEntitySet(new HashSet<Class<?>>(Arrays.asList(PersonWith_idPropertyOfTypeObjectId.class, PersonWith_idPropertyOfTypeString.class, PersonWithIdPropertyOfTypeObjectId.class, PersonWithIdPropertyOfTypeString.class, PersonWithIdPropertyOfTypeInteger.class, PersonWithIdPropertyOfTypeBigInteger.class, PersonWithIdPropertyOfPrimitiveInt.class, PersonWithIdPropertyOfTypeLong.class, PersonWithIdPropertyOfPrimitiveLong.class, PersonWithIdPropertyOfTypeUUID.class)));
mappingContext.setSimpleTypeHolder(conversions.getSimpleTypeHolder());
mappingContext.initialize();
DbRefResolver dbRefResolver = new DefaultDbRefResolver(factory);
MappingMongoConverter mappingConverter = new MappingMongoConverter(dbRefResolver, mappingContext);
mappingConverter.setCustomConversions(conversions);
mappingConverter.afterPropertiesSet();
this.mappingTemplate = new MongoTemplate(factory, mappingConverter);
}
Aggregations