I found it when I was using the library spring-data-dynamodb
to access DynamoDB
of ʻAWS from
spring boot`, so I decided to write it.
The beginning of the matter is to create the table and attributes defined in the snake case in DynamoDB
, and define thefindByitemAttr ()
method to access it from spring
.
And when I try to execute it, the following error message appears and it cannot be started.
error contents
You have defined query method in the repository but you don't have any query lookup strategy defined.
The infrastructure apparently does not support query methods!
Translated into Japanese, he said something like "I defined a query method in the repository, but it doesn't support queries because the query search method is not defined."
When I was worried about it, I got a warning when I started it. I remember.
I thought it was probably because of the version compatibility mismatch between spring boot
and spring data dynamod b
.
There must be such a reason. When I started by matching the versions while thinking, it started brilliantly, and I was able to access the table that defines the snake case.
By the way, the version when the error occurred is as follows. ・ Spring Boot: 2.1.3 ・ Spring data dynamodb: 5.0.4
From there I modified the version of Spring Boot
to 2.0.8
.
This time, my bad points came out. Everyone should be careful about version compatibility.
By the way, the story of version compatibility of sprinf-data-dynamodb
is written below.
https://derjust.github.io/spring-data-dynamodb/
Even so, spring data dynamodb
, if it is version compatible and an error occurs, please give an error that is a little easier to understand.
Recommended Posts