Answer the question
In order to leave comments, you need to log in
Where can I see an example of a bunch of spring, mongodb, hibernate?
Good day. Are there projects on github or materials where you can see and feel the Spring + mongodb + hibernate bundle using an easy (for beginners) example? It is desirable "fresh" approaches and more correct (actual).
Thank you!
Answer the question
In order to leave comments, you need to log in
Here is what you want to do. In general, this can be used, but in my opinion, using Spring Data MongoDB looks more convenient.
Well, what about configurations in XML or Java - as you like.
UPD Mongo java config
@Configuration
@EnableMongoRepositories
public class MongoConfiguration extends AbstractMongoConfiguration {
@Override
protected String getDatabaseName() {
return "dataBaseName";
}
@Override
public Mongo mongo() throws Exception {
return new MongoClient("127.0.0.1", 27017);
}
@Override
protected String getMappingBasePackage() {
return "foo.bar.domain";
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question