No property findAll found for type With Cassandra Entity

Author: ravthiru

Originally Sourced from: https://stackoverflow.com/questions/62588049/no-property-findall-found-for-type-with-cassandra-entity

My custom repository is extending CassandraRepository

public interface CassandraRepository<T, ID> extends CrudRepository<T, ID> {
    <S extends T> List<S> saveAll(Iterable<S> var1);

    List<T> findAll();

    List<T> findAllById(Iterable<ID> var1);

    Slice<T> findAll(Pageable var1);

    <S extends T> S insert(S var1);

    <S extends T> List<S> insert(Iterable<S> var1);
}

and my Custom repository class is

@Repository
public interface BookManageRepository extends CassandraRepository<BookEntity, BookKey> {
 ...
}

And iam getting following Exception

  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with 
    name 'bookManageRepository' defined in com.test.cassandra.repository.BookManageRepository 
    defined in @EnableReactiveCassandraRepositories declared on 
    CassandraReactiveRepositoriesRegistrar.EnableReactiveCassandraRepositoriesConfiguration: 
    Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type BookEntity!
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1306)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1226)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789)

Getting Exception "No property findAll found for type", I dont have any Property findAll in my Entity

Using Springboot 2.3

This is my Book Entity

@Table("books")
public class BookEntity {
    
    @PrimaryKey
    private BookKey key;
    
    @Column("book_id")
    private String BookId;

    @Column("book_name")
    private String bookName;

    @Column("book_type")
    private String deviceType;

    @Column("created_date")
    private LocalDateTime createdDate;
    
    ...

}

Configuration

@Configuration
@EnableCassandraRepositories(basePackages = {"com.test.cassandra.repository"})
public class SpringDataCassandraConfig {

@Bean
public CqlSession session() {
    return CqlSession.builder().withKeyspace("mykeyspace").build();
}