我在我的图片上传服务器上使用redis和spring框架.我需要将图像存储到redis.我发现了以下问题,但它是为了python.
如何使用python/PIL将图像存储到redis中
我不确定这是不是最好的方法,但我想知道如何在java中做(最好使用spring框架).我正在使用使用jedis的spring-data-redis.
我想知道将图像存储在redis中是否是一个好策略.
我试图通过他们在nodejs上的aws-sdk在dynamodb上创建一个表.下面是我在dynamodb.createTable上传递的参数:
{
TableName: 'new_table',
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1
},
KeySchema: [
{AttributeName: 'primary_key', KeyType: 'HASH'}
],
AttributeDefinitions: [
{AttributeName: 'primary_key', AttributeType: 'S'},
{AttributeName: 'some_attribute', AttributeType: 'S'}
]
}
Run Code Online (Sandbox Code Playgroud)
这回来了
ValidationException: One or more parameter values were invalid: Number of attributes in KeySchema does not exactly match number of attributes defined in AttributeDefinitions
Run Code Online (Sandbox Code Playgroud)
我通过在'KeySchema'上添加'some_attribute'来解决这个问题,但我想要的是一个没有'range'的'hash'表.