Java Techies- Solution for All
Spring Framework
1.1 Introduction Spring Framework
Spring framework is an open source Java platform begin developed by Spring source company. Spring framework is also available for .NET framework (Spring .NET). Spring framework is developed to simplify the development of enterprise applications in Java technologies.
Learn More... |
1.2 Benefits Of Spring Framework
Spring enables to develop enterprise-class applications using POJOs.
The benefit of using only POJOs is that you do not need an EJB container product such as an application server.
Learn More... |
1.3 Spring Framework Architecture
Spring is use to develop your all enterprise applications, however, Spring is modular, allowing you to choose which modules are applicable to you, without having to bring in the rest.
The Spring Framework provides about 20 modules which can be used based on an application requirement.
Learn More... |
1.4 Spring First Example
This example use eclipse IDE to run the example. You need do follow several steps to run spring example
Learn More... |
1.5 Spring IoC Containers
The basic concept of Inversion of Control (IoC) is that, programmer do not need to create the objects, instead just describe how it should be created. No need to directly connect your components and services together in program, instead just describe which services are needed by which components in a configuration file/xml file.
Learn More... |
1.6 Spring Dependency injections
The basic concept of Inversion of Control (IoC) is that, programmer do not need to create the objects, instead just describe how it should be created. No need to directly connect your components and services together in program, instead just describe which services are needed by which components in a configuration file/xml file.
Learn More... |
1.7 Spring Constructor Injection Example
This Example show the dependency injection in constructor and also called constructor injection.
Learn More... |
1.8 Spring Setter Injection Example
Here is the example for Setter Injection in Spring.
Learn More... |
1.9 Spring Bean Scopes
Spring Bean scope is singleton that is only one bean is created per spring container and shared by other objects. Spring has
Learn More... |
1.10 Spring Collection Dependencies
Following Examples shows the Spring Collection Dependencies.
Learn More... |
1.11 Spring Factory Bean
Factory-bean in spring facilitates to create bean by factory class. Factory class will have non- static methods to return the object of bean.
Factory class must have a static method to return the instance of class itself. Below the example to understand factory-bean.
Learn More... |
1.12 Spring Annotation Based Configuration
Spring 2.5 onward it became possible to configure the dependency injection using annotations. Annotation injection is performed before XML injection.
Learn More... |
1.13 Spring Auto Components Scanning Example
You have to annotate with @Component to indicate this is an auto scan component.
Learn More... |
1.14 Spring @PostContruct and @PreDestroy Example
The @PostConstruct and @PreDestroy annotation are J2ee specific, lies in common-annotations.jar. The init() method is called, after the message property is set, and the destroy() method is call after the context.close();
Learn More... |
1.15 Spring AOP
Spring AOP[Aspect-oriented programming] is one of the important feature of spring framework, used to modularize cross-cutting concerns in aspects.
Aspects is just an interceptor to intercept some processes, for example, when a method is execute, Spring AOP can intercept in between the executing method,
and add extra functionality before or after the method execution.
Learn More... |
1.16 Spring AOP With Annotation
Some common AspectJ Annotations are used for Spring AOP. These Annotations are given here -
Learn More... |
1.17 Spring JSR 330 Annotation
Spring 3.0 supports standard JSR 330 Dependency Injection for java. These annotations are scanned the same way as the Spring annotations,
only requirement would be to have the relevant jars in your classpath.
Learn More... |
1.18 Spring Java Configuration
Spring java configuration is a third way of doing Dependency Injection (DI) other than XML and Annotations. It is introduced in Spring 3.0, uses java syntax instead of XML.
Learn More... |