The advantage of using the spring framework is the efficient beans management by the IOC container. We never create an instance in the code instead spring creates and manages them. In the certain scenarios, the demand is to use the factory methods for creating the instances of an particular object due to the restriction imposed …
Spring Framework
Spring Framework 4.0 RC1 Released
Spring Framework 4.0 Release Candidate 1 is released by Spring IO this week. Earlier they have announced that Spring 4.0 is due to the release in October 2014. However, in the latest blog post they have indicated that it will be available by December 2014. The last addition of new features with this release candidate …
How to create a Spring Bean of an Inner class?
In this tutorial I will explain how to declare bean definition for the Inner classes in Spring XML configuration. When you are using inner class as spring beans, you have to specify the binary class name of that inner or nested class to instantiate as a bean. If you have a class ExampleType and it …
Register Spring Beans to BeanFactory using registerSingleton
Spring’s strength lies on its core framework’s Inversion Of Control (IOC) and how the beans are instantiated and managed by the IOC container. All the beans in the spring’s IOC containers are managed as the singleton beans by default for the efficient and good performance. As a good practice, you should never create instance for …
@Import Annotation in Spring Framework
In my previous article I have explained about the JavaConfig in Spring 3.0. It is a new way of configuring the bean definitions without using the traditional XML files. Also I have listed the annotations defined as part of JavaConfig approach. If you are beginner in spring framework, we have huge collection of spring tutorials …
@Configuration Annotation in Spring 3.0
Spring 3.0 has introduced new way for configuring the spring beans. In fact this option was maintained by spring framework separately as JavaConfig project. Later this project is merged to the spring core framework and all the features are directly accessible from the spring core. If you are beginner in spring framework, we have huge collection …
Difference Between @Resource, @Autowired and @Inject in Spring Injection
It is very common confusion among the spring developers that what is the real difference between these three (@Resource, @Autowired and @Inject) annotations used for injecting the objects. I have come across this question from our readers so dedicated this post for explaining the main difference between these three annotations. Infact, these three work very …
How to use Spring HATEOAS LinkBuilder API with Spring REST?
Hypermedia as the Engine of Application State (HATEOAS) is a constraint for the REST architecture. If you are not familiar with the REST web services, REST is services exposed using an URI that is shared to the clients. A client can directly access that given URI to get the response which is mostly a JSON …