春季数据mongo-在课程上找不到属性“状态” ...您是说:状态?

时间:2019-02-26 16:07:19

标签: spring-data-mongodb

我正在使用Spring mongo数据,并且没有任何原因出现很多此类错误。服务器启动后,三十分钟后开始引发这些错误。

该实体包含显然找不到的属性:

org.springframework.data.mapping.context.InvalidPersistentPropertyPath: No property 'status' found on class com.parozlabs.tx.api.books.Book! Did you mean: status?

实体:

 @Document(collection = "books")
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class Book implements Resource {

    @Id
    private ObjectId id;
    private long created;
    private long startDate;
    private BookStatus status;

 <getters and setters>
 ...
 }

存储库

public interface BooksRepositoryCustom extends
PagingAndSortingRepository<Book, String> {

    // Get all books, for admins
    List<Book> findByStatus(BookStatus statuss);

}

0 个答案:

没有答案