Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ private AmazonDynamoDB buildAmazonDynamoDB() {
.standard()
.withEndpointConfiguration(
new AwsClientBuilder.EndpointConfiguration(
"dynamodb.your-region.amazonaws.com",
"your-region"
"https://dynamodb.us-east-1.amazonaws.com",
"us-east-1"
)
)
.withCredentials(
new AWSStaticCredentialsProvider(
new BasicAWSCredentials(
"your-access-Key",
"your-secret-key"
"AKIATUEXRRE3W4SKKSHC",
"cp7e/ZMK35rxgLU9L+1PqTJWKthDPy1+pydNmmLu"
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,13 @@
@Data
@AllArgsConstructor
@NoArgsConstructor
@DynamoDBTable(tableName = "employee")
@DynamoDBTable(tableName = "Todo-jrvfxwpmbvg5vn3gptmsgvjjmm-dev")
public class Employee {

@DynamoDBHashKey
@DynamoDBAutoGeneratedKey
private String employeeId;
private String id;

@DynamoDBAttribute
private String firstName;

@DynamoDBAttribute
private String lastName;

@DynamoDBAttribute
private String email;

@DynamoDBAttribute
private Department department;
private String message;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.dailycodebuffer.entity;

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAutoGeneratedKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@DynamoDBTable(tableName = "Todo-jrvfxwpmbvg5vn3gptmsgvjjmm-dev")
public class ToDo {

@DynamoDBHashKey
@DynamoDBAutoGeneratedKey
private String id;

@DynamoDBAttribute
private String message;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.springframework.stereotype.Repository;

@Repository
public class EmployeeRepository {
public class EmployeeRepository {

@Autowired
private DynamoDBMapper dynamoDBMapper;
Expand Down