Spring Core

Home/Tag: Spring Core

Use of @Order annotation in Spring

Introduction In this tutorial, we will learn about the @Order annotation in Spring. The @Order annotation in Spring defines the sorting order of beans or components. Before Spring 4.0, this annotation supported only the ordering of AspectJ aspects. Since Spring 4.0, it supports many kinds of components e.g. even for collection injection. 1. The @Order annotation in Spring Right from [...]

By |2020-05-29T15:50:41+00:00May 29th, 2020|Categories: Spring Framework|Tags: , |

Profiles in Spring to register beans conditionally

In Spring Framework, profiles are logical groups of bean definitions that are registered only if the given profile is active. It is possible to assign a bean with multiple Profiles, separated with logical operations like not (!), and (&) and or (|) etc. Profiles in Spring are specified with the @Profile annotation in Spring. It is possible to use and [...]

By |2020-04-08T13:08:01+00:00April 7th, 2020|Categories: Spring Framework|Tags: , |