How SpringData integrates MongoDB access

How SpringData integrates MongoDB access

Spring Source groaning, from February 2011 to February 2011, finally released spring-data-mongo-1.0.1 to Release. Versions from 1.0.0.M1 to 1.0.0.M3 are called Spring Data Document. 1.0.0.M4 began to be renamed Spring Data MongoDB 1.0.0 M4, but the official website does not specify it. At first glance, it is a bit inexplicable, especially when MongoTemplate moves from org.springframework.data.document.mongodb to org.springframework.data.mongodb.core, the HelloWorldExample on the official website still uses org.springframework.data.document.mongodb as an example, which really causes a lot of misleading. Spring Data Mongo needs to rely on the Spring Framework, therefore, first you need to download the Spring Framework jar package, create a new Web project, and import the Spring Framework jar package. This article references the following components: Among them, in addition to several component packages of Spring, the Driver of MongoDB is also referenced: mongo-2.7.3.jar; component dwr.jar of DWR3.0; spring-data-mongdb-1.0.1.RELEASE.jar and Spring Data public component spring-data-commons-core-1.2.1.RELEASE.jar. It should be noted that the Spring used in this article The component version of Data Mongo needs to use Spring Framework 3.0.7 or above, otherwise an error will be reported when the program runs. the After introducing the above components, you need to modify the Spring configuration file ApplicationContext.xml file to introduce Spring Data…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索