在使用 AWS JAva SDK 时,为了定义 DynamoDBHashKey,我们使用 @DynamoDBHashKey 注释。
奇怪的是,如果我使用如下注释
@DynamoDBHashKey
String Abc
代替
@DynamoDBHashKey
String abc
这给了我一个错误,在 com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperTableModel.hashKey(DynamoDBMapperTableModel.java:119) [junit] 在 com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperTableModel 没有映射 HASH 键 [junit] $Builder.build(DynamoDBMapperTableModel.java:449) [junit] 在 com.amazonaws.services.dynamodbv2.datamodeling.StandardModelFactories$StandardTableFactory.getTable(StandardModelFactories.java:104) [junit] 在 com.amazonaws.services.dynamodbv2.datamodeling .DynamoDBMapper.getTableModel(DynamoDBMapper.java:393) [junit] at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper.generateCreateTableRequest(DynamoDBMapper.java:2148) [junit] at com.amazonaws.services.dynamodbv2.datamodeling.AbstractDynamoDBMapper .generateCreateTableRequest(AbstractDynamoDBMapper.java:319)
我无法理解为什么变量命名约定在失败中起作用任何想法?