嵌套的异常是org.springframework.data.mapping.PropertyReferenceException:未找到属性findAll,类型为InwardRegister

时间:2019-05-06 08:03:36

标签: spring-data-cassandra

我收到以下错误:

  

org.springframework.data.mapping.PropertyReferenceException:未找到属性InwardRegister类型的所有属性

这是我的代码:

@Repository
public interface InwardRegisterRepository extends ReactiveSortingRepository<InwardRegister,Long> {

    @AllowFiltering
    Flux<InwardRegister> findByDateTime(Date dateTime);

    @AllowFiltering
    Flux<InwardRegister> findBySenderOrderById(String sender);
}

@Service
public class InwardRegisterService {

    @Autowired
    InwardRegisterRepository inwardRegisterRepository;

    public Mono<InwardRegister> create(InwardRegister inwardRegisterRecord) {
        return inwardRegisterRepository.save(inwardRegisterRecord);
    }

    public Mono<InwardRegister> read(Long id){
        return inwardRegisterRepository.findById(id);
    }

    public Flux<InwardRegister> readAll(){
        return inwardRegisterRepository.findAll(Sort.by("ASI","id"));
    }
}

1 个答案:

答案 0 :(得分:0)

错误似乎您的bean InwardRegister.class不包含@Id javax.persistence批注,因为请提供Entity类的详细信息以进一步检查。