25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 15 ■ <strong>Spring</strong> Data Within Your <strong>Spring</strong> Application<br />

Figure 15-1. MongoDB Shell Shows the mydocuments Database and the Two Collections, Docs and Types<br />

Figure 15-1 shows the invocation of the MongoDB server with the command mongo. This command will enter into<br />

the MongoDB shell, and by default the MongoDB server will set the test database as a default. To list the available<br />

databases, use the show dbs command. In your case, you should have the mydocuments database. To switch to the<br />

mydocuments database, use the use mydocuments command. Then you can see the collection that belongs to the<br />

database with the show collections command; you should see the docs and the types collections.<br />

Figures 15-2 and 15-3 show the results of the unit test.<br />

212

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!