Open muety opened 3 years ago
I actually implemented this by creating a ReactiveSpecificationArgumentResolver
and everything seems to work. I'd like to submit a PR, however, I'm currently stuck with the comprehensive set of sets. How would I preferably test this new class? What tests classes shall I create a "reactive" version of and which can be skipped?
@muety I know it's been more than a year when you commented on this -- sorry for the delay. Please find my comment below and let me know if you are willing to continue on this so that contribution/PR is counted. If not, then we will take over this topic.
This is a great question. Ideally everything should be tested thoroughly, but on the other hand it seems like an overkill to repeat all the tests or generalize them to the level that would allow having parametrized tests that are executed agains mvc and reactive versions of the resolver. Also, there are unit tests which should give some confidence...
Sooo.... I propose that you create a PR with a basic set of integration tests (something with and/or query + some joins) and we will mark it as an 'experimental' feature in the README.
Thank you for contribution.
Hi @tkaczmarzyk, thanks for getting back to this! I'd be happy if you could take over, though. I'm not really involved with the project anymore.
On a second thought, I think this is not as easy as just implementing ReactiveSpecificationArgumentResolver -- even though it may seem to work fine.
Specification-arg-resolvers is an extension to Spring Data JPA (which in turns covers Hibernate and JDBC) that is not reactive. Using relational Db with a non-reactive driver is not a valid approach when writing a reactive/webflux application. It can seem to work for a first test request or a few requests, but generally will behave in an unexpected way.
There are several reactive projects an discussions to follow in this topic:
I think it makes sense to provide functionality of e.g. resolving Mono
I'd like to use this great library within a Spring WebFlux-based reactive application. However, this doesn't seem to be supported. I didn't dig deeper into it, but it looks like the
SpecificationArgumentResolver
implementsorg.springframework.web.method.support.HandlerMethodArgumentResolver
, while in a reactive stack, an argument resolver must implementorg.springframework.web.reactive.result.method.HandlerMethodArgumentResolver
(seeWebFluxConfigurer
). I'd assume that the interfaces look similar, but I didn't investigate further.