Friday, January 20, 2012

Spring MVC 3.1 - Implement CRUD with Spring Data MongoDB (Part 4)

Review

In the previous section, we have implemented the Java classes and organized them in various layers. In this section, we will write the configuration files, which are mainly XML documents.


Configuration

To enable MongoDB repository, including template support, we have to declare the following beans:
  • a Mongo repository
  • a Mongo host
  • a Mongo template
  • Optionally, we declared an InitMongoService to automatically populate our database with sample data


For MongoDB connection, we've extracted the database properties in a separate file.


Finally, here's our applicationContext.xml file

Next

In the next section, we will create the HTML and JavaScript files. Click here to proceed.
StumpleUpon DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google I'm reading: Spring MVC 3.1 - Implement CRUD with Spring Data MongoDB (Part 4) ~ Twitter FaceBook

Subscribe by reader Subscribe by email Share

4 comments:

  1. Great tutorial..i read 3-4 tutorial..same architecture of all helped a lot..

    ReplyDelete
  2. I have read your blog its very attractive and impressive. I like it your blog.

    Spring online training Spring online training Spring Hibernate online training Spring Hibernate online training Java online training

    spring training in chennai spring hibernate training in chennai

    ReplyDelete
  3. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

    core java training in Electronic City

    Hibernate Training in electronic city

    spring training in electronic city

    java j2ee training in electronic city

    ReplyDelete

  4. To keep current, you need to find trustworthy technology news sources that will provide you with up-to-date information.

    Xfinity
    Green Dinosaur Pokemon
    pubfilm

    ReplyDelete