Spring Expression Language – Accessing Collection – List

Pre-requisite trails Spring Setter Injection Spring Constructor Injection Spring Injection of List Concept Overview In general, most of the beans declared for dependency injection using Spring are statically defined i.e. It is known a-priori what the dependencies are going to be. However, in certain advanced situations, there may be a requirement to perform dependency injection … Read more

Spring Expression Language – Regular Expressions

Concept Overview In general, most of the beans declared for dependency injection using Spring are statically defined i.e. It is known a-priori what the dependencies are going to be. However, in certain advanced situations, there may be a requirement to perform dependency injection dynamically at runtime. Such dynamic dependency injection is possible in Spring using … Read more

Spring Expression Language – Logical Operators

Concept Overview In general, most of the beans declared for dependency injection using Spring are statically defined i.e. It is known a-priori what the dependencies are going to be. However, in certain advanced situations, there may be a requirement to perform dependency injection dynamically at runtime. Such dynamic dependency injection is possible in Spring using … Read more

Spring Expression Language – Mathematical Operators

Concept Overview In general, most of the beans declared for dependency injection using Spring are static and statically defined i.e. It is known a-priori what the dependencies are going to be. However, in certain advanced situations, there may be a requirement to perform dependency injection dynamically at runtime. Such dynamic dependency injection is possible in … Read more

Spring Expression Language – Referencing Static Methods and Members

Concept Overview In general, most of the beans declared for dependency injection using Spring are static and statically defined i.e. It is known a-priori what the dependencies are going to be. However, in certain advanced situations, there may be a requirement to perform dependency injection dynamically at runtime. Such dynamic dependency injection is possible in … Read more

Spring Expression Language – Referencing Beans

Concept Overview In general, most of the beans declared for dependency injection using Spring are static and statically defined i.e. It is known a-priori what the dependencies are going to be. However, in certain advanced situations, there may be a requirement to perform dependency injection dynamically at runtime. Such dynamic dependency injection is possible in … Read more

Spring p Namespaces

Concept Overview Spring’s P namespace is an alternative to using the property tag. By using p namespace, we can perform dependency injection by directly using the attribute of bean tag instead of using the property tag. The benefits of using p namespace are: p namespace is more compact than property tag Using p namespace reduces … Read more

Spring Injection – Properties

Concept Overview Sometimes, it is necessary to inject a Collection of type java.util.Properties into a bean using Spring injection. e.g. A Car has many technical specifications associated with in the form of name-value pairs (e.g. Weight, Maximum Torque, No. of cylinders, etc). This is achieved by using the props tag within the property tag in … Read more

Spring Injection – Map

Concept Overview Sometimes, it is necessary to inject a Collection of type java.util.Map into a bean using Spring injection. e.g. A TelephoneDirectory maps the name of a person with his telephone number. This is achieved by using the map tag within the property tag in Spring configuration. The following sample program provides an overview of … Read more

Spring Injection – Set

Concept Overview Sometimes, it is necessary to inject a Collection of type java.util.Set into a bean using Spring injection. e.g. A Team may contains a Set of Players. This is achieved by using the set tag within the property tag in Spring configuration. The following sample program provides an overview of injecting a Set of … Read more