Spring 数据 MongoDB - 没有方法签名适用于参数类型
Spring Data MongoDB - no signature of method is applicable for argument types
我有一个调用 MongoOperations.find(Query query, Class<T> entityClass, String collectionName)
的特定方法,并按预期返回了 List<T>
。我想将方法更改为 stream()
,以防查询返回的对象数量异常大。根据 the documentation,stream()
应该有相同的签名,但是当我尝试使用 collectionName
调用该函数时,出现错误:
groovy.lang.MissingMethodException: No signature of method: org.springframework.data.mongodb.core.MongoTemplate.stream() is applicable for argument types: (org.springframework.data.mongodb.core.query.Query, java.lang.Class, java.lang.String)
当我删除 collectionName
时,它运行没有错误。这可能是 Spring 数据版本的问题吗?我该如何解决这个问题?
谢谢。
在MongoSpring1.10
版本中添加了MongoOperations
中以collection name
为参数的重载stream
方法。
更改已包含在机票中。 https://jira.spring.io/browse/DATAMONGO-1431
我有一个调用 MongoOperations.find(Query query, Class<T> entityClass, String collectionName)
的特定方法,并按预期返回了 List<T>
。我想将方法更改为 stream()
,以防查询返回的对象数量异常大。根据 the documentation,stream()
应该有相同的签名,但是当我尝试使用 collectionName
调用该函数时,出现错误:
groovy.lang.MissingMethodException: No signature of method: org.springframework.data.mongodb.core.MongoTemplate.stream() is applicable for argument types: (org.springframework.data.mongodb.core.query.Query, java.lang.Class, java.lang.String)
当我删除 collectionName
时,它运行没有错误。这可能是 Spring 数据版本的问题吗?我该如何解决这个问题?
谢谢。
在MongoSpring1.10
版本中添加了MongoOperations
中以collection name
为参数的重载stream
方法。
更改已包含在机票中。 https://jira.spring.io/browse/DATAMONGO-1431