Nate Vaughan
Nate Vaughan

Reputation: 3839

@ComponentScan with Spring and Mongodb

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:

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

Answers (1)

megalucio
megalucio

Reputation: 5411

Shouldn't you be using @Document instead of @Entity for mapping your persistence classes? See here

Upvotes: 1

Related Questions