Spring Core

Home/Tag: 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 [Read More]

By |2020-08-06T16:16:42+00:00August 6th, 2020|Categories: Spring Framework|Tags: , |

Handle Resources in Spring

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 [Read More]

By |2020-08-05T06:14:19+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 [Read More]

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 [Read More]

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