spring-data-mongodb
spring-data-mongodb does not actually create the index until the first time you pro grammatically access the collection that will contain the index. I believe that if you poke around their documentation, there is a way to get it to index auto-magically. As for my post, it is a bit out-dated now. Since they have released the official 1.0.0 release of spring-data-mongodb, you can set the write concern directly in your application Context using the
mongo:mongo element:
<mongo:mongo write-concern="SAFE"/>
<mongo:db-factory id="databaseFactory" .... mongo-ref="mongo" />
MySQL Interview Questions And Answers
MySQL Interview Questions And Answers