Beans Scopes in Spring

Bean scope in Spring are scope for a bean managed by Spring IOC container. As we know that Spring is a framework which is based on Dependency Injection(DI) and Inversion of Control (IoC) and provides bean management facilities to Java application. In Spring managed environment, bean are created and wired by Spring framework. Spring allows you to define how …


Collaborate Spring and MongoDB with Morphia (part 1)

As a big framework, Spring provided the way to access data from MongoDB database, called Spring-Data for MongoDB. In this article, I won’t show you how to use Spring-Data, but will show you how to use the Morphia in Spring.

1. What is Morphia?

Morphia is a lightweight type-safe library for mapping Java objects to/from MongoDB:

  • Easy to