Updated dependencies to use newer version of dynamoDB dependency

This commit is contained in:
chris.anatalio 2016-10-02 18:44:56 -07:00
parent d48bf9d2b6
commit a0f281a9f7
2 changed files with 6 additions and 8 deletions

View File

@ -105,9 +105,9 @@
<version>1.11.34</version>
</dependency>
<dependency>
<groupId>org.socialsignin</groupId>
<groupId>com.github.derjust</groupId>
<artifactId>spring-data-dynamodb</artifactId>
<version>4.2.1</version>
<version>4.3.1</version>
</dependency>
</dependencies>
@ -162,10 +162,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>opensourceagility-release</id>
<url>http://repo.opensourceagility.com/release/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>

View File

@ -1,10 +1,12 @@
package com.baeldung.spring.data.es.config;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.StringUtils;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.BasicAWSCredentials;
@ -27,7 +29,7 @@ public class DynamoDBConfig {
@Bean
public AmazonDynamoDB amazonDynamoDB() {
AmazonDynamoDB amazonDynamoDB = new AmazonDynamoDBClient(amazonAWSCredentials());
if (StringUtils.isNotEmpty(amazonDynamoDBEndpoint)) {
if (StringUtils.isEmpty(amazonDynamoDBEndpoint)) {
amazonDynamoDB.setEndpoint(amazonDynamoDBEndpoint);
}
return amazonDynamoDB;