mongodb java项目 源码_spring项目整合mongodb进行开发

spring项目整合mongodb进行开发:

MongoDB的性能指标:

100个并发,插入550万条记录的平均吞吐量:大约4100条/秒

MONGODB实际上是一个内存数据库,先将数据保存到内存,然后再写入磁盘中

1.官网下载mongodb.

fd7a4ac2d1117098990c7e4787e4c720.png

2.redhat上安装好mongodb

52e95ab4adcd16c50f0e89c636d2de54.png

18008b6b87e735d4d6c8896c5a293130.png

f55a462340a6e7303a24ea4c8d28d93f.png

a8b2aed0d27294e1029cbf8265400a22.png

3. spring中配置mongodb:

xmlns:p="http://www.springframework.org/schema/p"  xmlns:context="http://www.springframework.org/schema/context"

xmlns:aop="http://www.springframework.org/schema/aop"  xmlns:mvc="http://www.springframework.org/schema/mvc"

xmlns:util="http://www.springframework.org/schema/util" xmlns:mongo="http://www.springframework.org/schema/data/mongo"

xsi:schemaLocation="http://www.springframework.org/schema/beans      http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/context      http://www.springframework.org/schema/context/spring-context.xsd

http://www.springframework.org/schema/mvc      http://www.springframework.org/schema/mvc/spring-mvc.xsd

http://www.springframework.org/schema/aop      http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/util      http://www.springframework.org/schema/aop/spring-util.xsd

http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd">

4. 编写测试代码:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值