首页 文章

Spring Boot Couchbase请求恢复突然停止

提问于
浏览
0

软件版本:

Spring Boot v2.0.1
Enterprise Edition 5.1.0 build 5552

我有一个帐户存储库,我想通过电子邮件找到用户:

@N1qlPrimaryIndexed
@ViewIndexed(designDoc = "Account")
public interface AccountRepo extends CouchbasePagingAndSortingRepository<AccountEntity, String> {

    Optional<AccountEntity> findByEmail(String email);
    @Query("#{#n1ql.selectEntity} where #{#n1ql.filter} and email = $1")
    Optional<AccountEntity> findByEmailN1QL(String email);
}

现在当我调用repo的findByEmail方法时,请求突然停止执行,没有抛出任何错误或消息 . 这两种方法(Spring Data Keywords和N1QL Query)都会产生相同的行为 .

该实体存在并在服务器启动时创建,我在couchbase服务器上唯一做的就是创建存储桶,暂时没有视图或索引 .

这种行为的来源是什么?

我该怎么调试呢?

1 回答

  • 0

    问题是我在我的Account类上使用了UUID属性并且序列化POJO - > Couchbase Doc工作,但反序列化Couchbase Doc - > POJO没有 .

    移动到String而不是UUID,它可以工作 .

相关问题