Code Monkey home page Code Monkey logo

spring-data-mongo-demo's Introduction

SpringData MongoDB Example

This project is a simple demo of a few SpringData MongoDB features. The important bits under the co.ntier.examples.sdmongo base package:

  • model.Person - A simple POJO for our model, with a few annotations to make the transition to MongoDB a bit cleaner.
  • util.Auditable & util.AuditingUtil - Shows an example of how easy it is to intercept your models as they are stored & retrieved in MongoDB. The example is contrived, but should give you a good idea of the flexibility.
  • repo.PersonRepository - this is the real workhorse of SpringData I'd like to show. It's simply an interface that shows how SpringData gives you CRUD for free & how easy it is to add custom model-based lookups with literally no code.
  • DemoConfig - A Spring JavaConfig file that shows just how easy it is to get started without any XML
  • Demo - And finally, a simple command line app that allows you to run the code and see the bits and pieces working. Note that you'll need an instance of MongoDB running on your box w/ the default settings for this to work out of the box (if that's too much, update the DemoConfig as appropriate)

Why did you do this?

Because it was fun and easy, as most software should be. Feel free to fork / clone / copy and use however you'd like.

Why didn't you…

Did I do something wrong? Is there a better way of putting the pieces together? Great! Open an issue or submit a pull request! I'd love to learn from you!!

Have questions?

I'd be happy to help. Contact me at @david_welch or Google+

spring-data-mongo-demo's People

Contributors

dwelch2344 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

patoi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.