All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.data.simpledb.config.AbstractSimpleDBConfiguration Maven / Gradle / Ivy

Go to download

Provides a POJO centric model as per Spring Data interfaces to interact with Amazon SimpleDB, a non-relational datastore

There is a newer version: 1.0.1
Show newest version
package org.springframework.data.simpledb.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.simpledb.core.SimpleDb;
import org.springframework.data.simpledb.core.SimpleDbTemplate;

/**
 * Base class for Spring Data SimpleDB configuration using JavaConfig. 
* *
    *
  • support for useful bean injection
  • *
  • support for declaring SimpleDB configuration elements
  • *
*/ @Configuration public abstract class AbstractSimpleDBConfiguration { @Bean public SimpleDbTemplate simpleDBTemplate(){ return new SimpleDbTemplate(simpleDb()); } public abstract AWSCredentials getAWSCredentials(); /** * Override this to configure non credential {@link org.springframework.data.simpledb.core.SimpleDb} properties */ public void setExtraProperties(SimpleDb simpleDb){ } @Bean public SimpleDb simpleDb(){ AWSCredentials credentials = getAWSCredentials(); SimpleDb simpleDb = new SimpleDb(credentials.getAccessID(), credentials.getSecretKey()); setExtraProperties(simpleDb); return simpleDb; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy