Mongo Change Streams Doesn't Work with v0.12.x #1706
Comments
Maybe you miss a type/reflection hint on |
Yeah, this doesn't work SentryMan/Manga-Spring-Backend@5d3ee9c Also, I had it working before without needing to add reflection. I only recently noticed it had stopped working. I personally suspect that when this constructor got deprecated something broke.
|
Your repro is using an outdated RC, please use Spring Native 0.12.1 with latest Spring Boot 2.7.x version. |
That was the first thing I tried. https://github.com/SentryMan/Manga-Spring-Backend/blob/a9931a7876e45f3c55694e8d698df2c14edfe6eb/pom.xml |
It seems when I revert the version to spring native 11.4 / 2.6.6 it works |
Yeah, the problem seems to start at v0.12.0 |
Could be missing reflection hints on the parameters that are used to identify the new constructor reflectively. Please make a try with reflection hints for all the parameter types used in |
That also didn't work |
How shall we proceed? |
I tried https://github.com/SentryMan/Manga-Spring-Backend/blob/a9931a7876e45f3c55694e8d698df2c14edfe6eb/pom.xml, but when running it with |
I have created an example repo to show this error https://github.com/SentryMan/Spring-Native-Mongo-Change-Stream |
Spring Native is now superseded by Spring Boot 3 official native support, see the related reference documentation for more details. As a consequence, I am closing this issue, and recommend trying your use case with latest Spring Boot 3 version. If you still experience the issue reported here, please open an issue directly on the related Spring project (Spring Framework, Data, Security, Boot, Cloud, etc.) with a reproducer. Thanks for your contribution on the experimental Spring Native project, we hope you will enjoy the official native support introduced by Spring Boot 3. |
So, I'm working with Mongo change streams.
reactiveMongoTemplate.changeStream("Manga", FULL_DOC, Manga.class)
But I'm getting this error when I try to subscribe to events:
I have added the
ChangeStreamDocument
class to my reflection config, and It works fine when I'm not running on the binary.Here is my repo: https://github.com/SentryMan/Manga-Spring-Backend/blob/8bd0c2367265fc4e7fedb67be2aecd9deb4e4816/src/main/java/com/mangasite/services/MangaService.java#L94-L95
The text was updated successfully, but these errors were encountered: