Spring Core

Spring @Import and @ImportResource annotations

In this tutorial, you will learn to use Spring @Import and @ImportResource annotations to import configurations from java-config class and XML configurations respectively. These annotations work well with @Configuration annotations. Make sure you have a clear understanding of the ways to do Dependency Injections in Spring and the other related concepts. Check the related article on Inversion of Control and [...]

By |2024-04-02T07:40:41+00:00August 6th, 2020|Categories: Spring Framework|Tags: , |

Handle Resources in Spring using Resouce, ResourceLoader and ResourceLoaderAware

This article touches upon how to Handle Resources in Spring and we will look into the various interfaces like Resource, ResourceLoader, and ResourceLoaderAware. We usually do not have to make any modifications to the way in which Spring works with resources. We will specifically learn how Spring handles resources. Do not be confused with @Resource annotation. This article is about [...]

By |2024-04-02T08:58:18+00:00August 5th, 2020|Categories: Spring Framework|Tags: , |

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 |2024-04-02T11:16:39+00:00May 29th, 2020|Categories: Spring Framework|Tags: , |

Spring Profiles to register beans conditionally, efficiently

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 |2024-04-02T10:07:54+00:00April 7th, 2020|Categories: Spring Framework|Tags: , |
Go to Top