Q: Spring Data key-value custom queries does not work There is an in-memory repository class:
@Repository
interface InMemoryBookRepository extends CrudRepository<Book, String> {
    int countByAuthor(String author);
}

The book model class:
@Value
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@AllArgsConstructor
@KeySpace("books")
class Book {
    @Id
    String id;
    String title;
    String author;
    String isbn;
}

whenever I try to invoke this method an exception is thrown: java.lang.UnsupportedOperationException: Query method not supported. The version of the spring-data-keyvalue is 2.6.4 - the latest one. Any advice?

A: Repositories work with Entity classes.
So my guess is, that you should annotate your Book Class with @Entity.
@Value
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@AllArgsConstructor
@KeySpace("books")
@Entity
class Book {
    @Id
    String id;
    String title;
    String author;
    String isbn;
}

