What are the features of Spring?

  • Lightweight: Spring is lightweight when it comes to size and transparency. The basic version of the Spring Framework is around 1 MB. Besides, the processing overhead is also very negligible.
  • Inversion of Control (IoC): Loose coupling is achieved in Spring using the technique, inversion of control. The objects give their dependencies instead of creating or looking for dependent objects.
  • Aspect-oriented Programming (AOP): Spring supports aspect-oriented programming and enables cohesive development by separating the application business logic from system services.
  • Container: Spring contains and manages the life cycle and configuration of application objects.
  • MVC Framework: Spring comes with an MVC web application framework built on the core Spring functionality. This framework is highly configurable via strategy interfaces and accommodates multiple view technologies such as JSP, Velocity, Tiles, iText, and POI. However, other frameworks can be easily used instead of Spring MVC Framework.
  • JDBC Exception Handling: The JDBC abstraction layer of Spring offers a meaningful exception hierarchy, which simplifies the error-handling strategy.
  • Integration: Spring provides the best integration services with Hibernate, JDO, and iBATIS.
  • Transaction Management: Spring Framework provides a generic abstraction layer for transaction management. This allows the developer to add the pluggable transaction managers and makes it easy to demarcate transactions without dealing with low-level issues. Spring’s transaction support is not tied to J2EE environments, and it can also be used in container-less environments.

Spring is frame work for multiple application development, it provides bunch classes which is internally used the J2EE supplied classes, So we can say spring is alternate to struts but complement to j2ee.

This is the core feature of Spring but it’s just one of the myriad features it provides.

  • Need to access the database from Java application? Use Spring’s JDBC or ORM modules.

  • Need to insert the logging feature in your Java application? Use Spring’s AOP module.

  • Need to create a web based Java application? Use Spring’s Web Module.

  • Need to perform unit and integration testing? Use Spring’s Test module.

  • Need to create a messaging-based application? Use Spring’s Messaging module.

  • Need to implement security features in your Java application? Use Spring’s Security module.