Skip to content

Commit

Permalink
Ensure compatibility with updated Spring-data
Browse files Browse the repository at this point in the history
Now support Spring-Boot 1.5 and updated AWS SDK to the latest version
  • Loading branch information
derjust committed Feb 20, 2017
1 parent 35d49d2 commit 234651a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 30 deletions.
31 changes: 8 additions & 23 deletions README.md
Expand Up @@ -24,33 +24,18 @@ The major and minor number of this library refers to the compatible Spring frame
API changes will follow SEMVER and loosly the Spring Framework releases.

| `spring-data-dynamodb` version | Spring Framework compatibility | Spring Data compatibility |
| ------------- | ------------- | -------- |
| 1.0.x | >= 3.1 && < 4.2 | |
| 4.2.x | >= 4.2 && < 4.3 | Gosling-SR1|
| 4.3.x | >= 4.3 | Gosling-SR1|
| 4.4.x | >= 4.3 | Hopper-SR2 |
| ------------------------------- | ------------------------------ | ------------------------- |
| 1.0.x | >= 3.1 && < 4.2 | |
| 4.2.x | >= 4.2 && < 4.3 | Gosling-SR1 |
| 4.3.x | >= 4.3 | Gosling-SR1 |
| 4.4.x | >= 4.3 | Hopper-SR2 |
| 4.5.x | >= 4.3 | Ingalls |

`spring-data-dynamodb` depends directly on `spring-data` as also `spring-context`, `spring-data` and `spring-tx`.

`compile` and `runtime` dependencies are kept to a minimum to allow easy integartion, for example into
Spring-Boot projects.

### Workaround for Spring Boot >= 1.5.x w/ Spring Framework Version >= 4.3.6 ###

As with Spring Boot 1.5.x the `Ingalls` releasetrain of Spring Data is used, this leads to startup failures with the current version of this library. A possible workaround is to lock the use Spring Data releasetrain to `Hopper` like this (add to your `pom.xml`):

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-releasetrain</artifactId>
<version>Gosling-SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

## Quick Start ##

Download the JAR though [Maven](http://mvnrepository.com/artifact/com.github.derjust/spring-data-dynamodb):
Expand All @@ -59,7 +44,7 @@ Download the JAR though [Maven](http://mvnrepository.com/artifact/com.github.der
<dependency>
<groupId>com.github.derjust</groupId>
<artifactId>spring-data-dynamodb</artifactId>
<version>4.3.1</version>
<version>4.5.0</version>
</dependency>
```

Expand All @@ -73,7 +58,7 @@ repositories {
dependencies {
compile group: 'com.github.derjust',
name: 'spring-data-dynamodb',
version: '4.3.1'
version: '4.5.0'
}
```

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Expand Up @@ -3,10 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.derjust</groupId>
<artifactId>spring-data-dynamodb</artifactId>
<version>4.4.2-SNAPSHOT</version>
<version>4.5.0-SNAPSHOT</version>
<name>Spring Data DynamoDb</name>
<description>Spring Data module providing support for DynamoDb repositories.</description>
<url>http://github.com/michaellavelle/spring-data-dynamodb</url>
<url>http://github.com/derjust/spring-data-dynamodb</url>

<licenses>
<license>
Expand All @@ -16,10 +16,10 @@
</licenses>

<properties>
<spring.version>4.3.2.RELEASE</spring.version>
<spring-data.version>Hopper-SR2</spring-data.version>
<spring.version>4.3.6.RELEASE</spring.version>
<spring-data.version>Ingalls-RELEASE</spring-data.version>
<hibernate-validator.version>5.2.4.Final</hibernate-validator.version>
<aws-java-sdk.version>1.11.68</aws-java-sdk.version>
<aws-java-sdk.version>1.11.93</aws-java-sdk.version>
<junit.version>4.12</junit.version>
<mockito.version>1.10.19</mockito.version>

Expand Down
Expand Up @@ -36,15 +36,19 @@
* @param <T>
* the type of the repository
*/
public class DynamoDBRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends
RepositoryFactoryBeanSupport<T, S, ID> {
public class DynamoDBRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable>
extends RepositoryFactoryBeanSupport<T, S, ID> {

private DynamoDBMapperConfig dynamoDBMapperConfig;

private AmazonDynamoDB amazonDynamoDB;

private DynamoDBOperations dynamoDBOperations;

public DynamoDBRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
super(repositoryInterface);
}

public void setAmazonDynamoDB(AmazonDynamoDB amazonDynamoDB) {
this.amazonDynamoDB = amazonDynamoDB;
setMappingContext(new DynamoDBMappingContext());
Expand Down

0 comments on commit 234651a

Please sign in to comment.