用户工具

站点工具


分享:技术:mongodb:spring整合mongodb

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
分享:技术:mongodb:spring整合mongodb [2015/07/27 10:37]
gxx 创建
分享:技术:mongodb:spring整合mongodb [2015/07/27 10:52] (当前版本)
gxx
行 191: 行 191:
  * <​dt><​b>​Title:</​b></​dt>​  * <​dt><​b>​Title:</​b></​dt>​
  * <dd>  * <dd>
- ​* ​redis服务接口</​dd>​+ ​* ​mongodb服务接口</​dd>​
  * <​dt><​b>​Description:</​b></​dt>​  * <​dt><​b>​Description:</​b></​dt>​
  * <dd>  * <dd>
行 241: 行 241:
  ​* ​   <​dt><​b>​Title:</​b></​dt>​  ​* ​   <​dt><​b>​Title:</​b></​dt>​
  ​* ​   <dd>  ​* ​   <dd>
- ​* ​   memcached服务实现类+ ​* ​   mongodb服务实现类
  ​* ​   </dd>  ​* ​   </dd>
  ​* ​   <​dt><​b>​Description:</​b></​dt>​  ​* ​   <​dt><​b>​Description:</​b></​dt>​
行 397: 行 397:
  <​head>​  <​head>​
  <meta http-equiv="​Content-Type"​ content="​text/​html;​ charset=utf-8"​ />  <meta http-equiv="​Content-Type"​ content="​text/​html;​ charset=utf-8"​ />
- <​title>​redis页面</​title>​+ <​title>​mongodb页面</​title>​
  </​head>​  </​head>​
  <​body>​  <​body>​
行 424: 行 424:
  </​body>​  </​body>​
 </​html>​ </​html>​
 +</​code>​
 +===== 演示 =====
 +{{ :​分享:​技术:​mongodb:​mongodb_1.png?​300 |}}
 +{{ :​分享:​技术:​mongodb:​mongodb_2.png?​500 |}}
 +{{ :​分享:​技术:​mongodb:​mongodb_3.png?​300 |}}
 +{{ :​分享:​技术:​mongodb:​mongodb_4.png?​500 |}}
 +<​code>​
 +gxx@iZ23goxo66aZ:​~$ mongo #​进入mongodb
 +MongoDB shell version: 2.4.9 #​当前版本
 +connecting to: test #​默认连接test数据库
 +> show dbs #​查看所有数据库,看到程序自动创建的record数据库
 +local   ​0.078125GB
 +record ​ 0.203125GB
 +test    0.078125GB
 +> use record #​切换到record数据库
 +switched to db record
 +> show collections #​查看record数据库中所有的集合
 +student
 +system.indexes
 +> db.student.find() #​查看student集合中所有的文档
 +{ "​_id"​ : ObjectId("​55b5958244f43fa4565e6079"​),​ "​_class"​ : "​com.gxx.record.base.vo.Student",​ "​name"​ : "​关向辉",​ "​friend"​ : { "​name"​ : "​沈云龙",​ "​sex"​ : true } }
 +{ "​_id"​ : ObjectId("​55b595e944f43fa4565e607a"​),​ "​_class"​ : "​com.gxx.record.base.vo.Student",​ "​name"​ : "​tt",​ "​friend"​ : { "​name"​ : "​aa",​ "​sex"​ : true } }
 +> exit #​退出mongodb
 +bye
 +gxx@iZ23goxo66aZ:​~$ ​
 </​code>​ </​code>​
分享/技术/mongodb/spring整合mongodb.1437964672.txt.gz · 最后更改: 2015/07/27 10:37 由 gxx