@Required Annotation in Spring

spring

Since Spring 2.5, annotation-based configuration has been an alternative to XML setups. Annotation based configuration rely on the bytecode metadata for wiring up components instead of angle-bracket declarations. Annotations can be used on the relevant class, method, or field declaration. Annotation injection is performed before XML injection, thus the latter configuration will override the former […]

Write your Extension Endpoints for Spring IOC Container

spring

In the previous post Custom Spring Callback Methods I discussed about the customizing bean lifecycle callback methods which are required at the time of bean initialization and its destruction. In this post I shall cover another aspect of Spring Container Extension Points. Note:Extension Points are well defined exposed places/hooks for others to provide extended functionality. […]

How to write Custom Spring Callback Methods?

spring

A Spring process follows bean based approach.The Spring bean is created, managed and dispensed by the Spring IoC container. Each Spring bean has a lifecycle and the lifecycle has to undergo the following stages: Instantiate – The Spring container instantiates the bean. Populate properties- Spring IoC container injects the bean’s properties. Set Bean Name- Spring […]

Custom Scope for Spring Beans

spring

In my previous posts Spring bean scopes (Singleton and Prototype) with example and Spring bean scopes (Request, Session, Global Session) with example I discussed about the bean scopes in spring. There’s one more scope which I forgot to mention, its the Thread scope. The spring documentation states that As of Spring 3.0, a thread scope […]

Spring bean scopes (Request, Session, Global Session) with example

output

When you define a bean in the configuration file, you are just defining the structure of the bean or it is just a class. With that definition, you can create any number of instances. Here the advantage of the bean is that, you are not only allowed to define the dependencies for the beans, you […]

Spring bean scopes (Singleton and Prototype) with example

spring

When you define a bean in the configuration file, you are just defining the structure of the bean or it is just a class. With that definition, you can create any number of instances. Here the advantage of the bean is that, you are not only allowed to define the dependencies for the beans, you […]

Hibernate Many-To-Many Mapping Example Using Annotations

hibernate_icon

In this tutorial we will write a simple Java project to demonstrate Hibernate Many to Many Mapping using Java Annotations. We will first create a Java project using Maven and then will add Hibernate on it. If you have any questions, please post it in the comments section. If you are interested in receiving the […]

Hibernate Many-To-Many Mapping Example (XML Mapping)

hibernate_icon

In this tutorial we will write a simple Java project to demonstrate Hibernate Many to Many Mapping using XML mapping. We will first create a Java project using Maven and then will add Hibernate on it. If you have any questions, please post it in the comments section. If you are interested in receiving the […]

Hibernate One-To-Many Mapping Example Using Annotations

hibernate_icon

In this tutorial we will write a simple Java project to demonstrate Hibernate one to Many Mapping using Java Annotations. In my previous article I have explained Hibernate one to Many Mapping using XML. The main difference between these two examples would be the hibernate configuration files and annotations. Otherwise both the articles trying the same […]

Hibernate One-To-Many Mapping Example (XML Mapping)

hibernate_icon

In this tutorial we will write a simple Java project to demonstrate Hibernate one to Many Mapping using XML mapping. We will first create a Java project using Maven and then will add Hibernate on it. If you have any questions, please post it in the comments section. If you are interested in receiving the […]