Reputation: 3839
I'm working on a Spring-boot application and trying out the MongoDB connector. I've noticed some differences between the way Spring handles entities and components when dealing with MongoDB than it does with traditional JPA and a RDB connector. My questions are these:
@SpringBootApplication
config class and attempt to map it for persistence? I saw some strange errors in which Spring seemed to be attempting to map for persistence classes that I had not annotated as @Entity.@ComponentScan
out the window? Are only Mongo Repositories in a specific
@EnableMongoRepositories(basePackages = { "some.package" })
package available as spring repositories? Is it possible to have a MongoRepository in another package annotated with the traditional JPA @Repository
?Any help understanding the differences between how Spring boot operates on relational JPA entities and entities for persistence with MongoDB would be appreciated.
Upvotes: 0
Views: 1524