'How to define a custom method with implementation in ReactiveMongoRepository?
How to define a custom method (with implementation) in SpringData ReactiveMongoRepository?
This method is supposed to be a stateless combination of calls to other methods in MyCollectionRepository and there is no need to generate a SpringData query from its name.
interface MyCollectionRepository : ReactiveMongoRepository<MyCollection, String> {
fun findSomething(param: Long): Flux<MyCollection> {
return Flux.empty<MyCollection>()
}
}
On application context initialization this exception is thrown:
org.springframework.data.mapping.PropertyReferenceException:
No property findSomething found for type MyCollection!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
