Category: Spring Core
Spring Autowire By Type
This tutorial shows how to use spring autowire by type. When the autowire by type is enabled, spring will autowire a property if exactly one bean of the property type exists in the container....
Spring Autowire By Name
This tutorial shows how to use spring autowire by name. When the autowire by name is enabled, spring will look for a bean with the same name as the property that needs to be...
Loading List from Properties file with spring @Value
This example shows you how to load a list from a properties file using the @Value annotation. In this tutorial we’ll be using the comma as a separator. But you can use any delimiter...
How to Disable/Skip @Required Annotation For Class
When you see this title, you may think “why should I skip a required field, can’t I just remove the annotation?”. And you are probably right. But imagine when you are using a third-party...
Spring Custom @Required styled annotation Example
In this tutorial we are creating and configuring our own custom spring @Required annotation type. This is as simple as creating the annotation, enabling the required bean dependency checking and registering the custom annotation...
Dependency Checking with Spring @Required Annotation
This tutorial explains how to use the spring @Required annotation. We can use this annotation to do some dependency checking at startup rather than at runtime. This makes it easier and quicker to detect...
Spring Annotation Configuration Example
This tutorial shows spring annotation configuration. Starting from Spring version 2.5, it is possible to configure bean dependency injection using annotations. So instead of using XML to describe a bean wiring, we can now...
Spring c-namespace XML Configuration Shortcut
This tutorial shows you how to use the spring c-namespace. In the previous tutorial we saw how to use the p-namespace to configure bean definition. The c-namespace allows you to configure the constructor arguments...
Spring p-namespace XML Configuration Shortcut
This example shows you how to use the spring p-namespace XML shortcut. The p-namespace is created to simplify the XML configuration. This namespace enables you to use the bean element’s attributes, instead of <property/>...