-
Notifications
You must be signed in to change notification settings - Fork 41.2k
BeanCreationException thrown creating 'neo4jMappingContext' with Spring Boot 2.4.2 when combined with MongoDB #25069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is the failure:
For future reference, @star4j, please include this sort information when opening an issue as it helps us to process things more efficiently. |
The change in behaviour is due to #24239. @meistermeier |
Will do. 👍 |
First of you are correct in tracking this down to the recent change we introduced in Spring Boot. Line 51 in 0104ee6
Persistent .(This now gets longer than I have expected...but glad you are still here) My suggestion is that if an entity should not get discovered is either creating a Neo4jMappingContext or MongoMappingContext bean manually and providing the initial entity set (setInitialEntitySet ) there.I would far less be in favour to go the defensive way and revert the changes because the stores are now aligned. What I would suggest, and can discuss with the Spring Data team, is that we talk about if and how to give users a more configuration-based way to separate the domain classes. |
Thanks, @meistermeier. While things are now aligned in terms of the annotations used when scanning, the behaviour when processing the results is not. For example, if I modify the supplied sample and replace Neo4j with Cassandra, the verification of the I think we either need to revert #24239 or Neo4j's verification needs to align with the other stores. |
Tried it with SD Cassandra and with the mongo/neo4j example provided ^^: Either replacing Neo4j with Cassandra or turning the example the other way around and making friend a Spring Data Neo4j |
That makes sense to me. We can take care of that.
That sounds good too. Boot includes @mp911de Please let us know how we can track the long-term solution so that we can keep Boot's code in sync. |
We'll discuss that topic within our team. I'm not sure why |
We discussed that topic with the Spring Data team and concluded that we should remove |
Thanks, Mark. Is there an issue that we can subscribe to so that we can align Boot with Data when the time comes? Until that time, we'll use this issue to remove |
We need to check which modules are affected and file tickets where the scanning needs to be fixed. I'll leave references here once we have created tickets. |
springboot 2.4.1 has no problem starting
If the type of the id field of the Friend class is changed to String, the startup is OK
**Test project address is https://github.com/star4j/test.git
The text was updated successfully, but these errors were encountered: