Pageable and Sort in Webflux
I recently started a project with Spring boot (2.0.2.RELEASE) and Webflux in Kotlin and when I tried to use Sort type in my resource/controller, surprisingly, I noticed that Webflux does not support Pageable and Sort at the time of writing this. I started to search and search and search, finally, I found this link, there is an on-going effort. So I had to come up with a solution and after digging into spring core, I found a hacky/ugly solution. So I just wanted to share it with you in case someone is looking for it. Feel free to share your idea about improving the code. Here is the gist.
I also paste the code here in case you don’t like Github anymore because of Microsoft :D. Hope it helps you at least till Spring team solve the issue.