This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Gson gson = new GsonBuilder().setPrettyPrinting().create(); | |
private static SdkHttpClient sdkHttpClient = UrlConnectionHttpClient.create(); | |
private static DynamoDbClient client = DynamoDbClient.builder() | |
.httpClient(sdkHttpClient) | |
.region(Region.US_EAST_1) | |
.credentialsProvider(EnvironmentVariableCredentialsProvider.create()) | |
.build(); | |
private static UserRepository userRepository = new DynamoDBUserRepository(client, gson); | |
static { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/reactive") | |
public class Controller { | |
private final R2DBCSubscriptionRepository userRepository; | |
@Autowired | |
public Controller(R2DBCSubscriptionRepository userRepository) { | |
this.userRepository = userRepository; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
@Table("blog.user") | |
@Builder | |
public class User { | |
@Id | |
private long id; | |
@Column | |
private String name; |