Features of Spring Framework

1. Inversion of Control and Dependency Injection: One of Spring Framework’s core features is support for the closely related concepts of Inversion of Control (IoC) and Dependency Injection (DI). IoC is a software design pattern whereby an assembler, in this case, Spring Framework, binds object coupling at run time instead of compile time.

2. Aspect-oriented Programming: Aspect-oriented programming is a complement to object-oriented programming that enables the application of these concerns through the definition of aspects, which specify how and when to apply the concerns. Spring Framework provides extensive tools for aspect-oriented programming.

3. Data Access and Transaction Management: Spring Framework provides a set of data access tools that simplify the extraction and persistence of Java objects in relational databases. Though these features make unit testing data access drastically easier, some vendor-specify SQL is still required. Spring Framework also provides extensive support for the Java Persistence API (JPA) and object-relational mappers such as Hibernate ORM.

4. Application Messaging: In any application, messaging is an important concern that needs addressing. For example, certain parts of a program may need to know when another part of the program performs a specified action. The part of the program performing this action could simply depend on the parts interested
in the action and call methods on all of them to notify them, but that type of tight coupling is hard
to maintain and can get very messy quickly.

Spring Framework also provides a loosely coupled messaging system that uses the publish-subscribe pattern: Components in a system announce that they are interested in certain messages by subscribing to them, and the producers of these messages publish the messages without caring who is subscribed. This is essentially how Twitter works: People who have interesting or perhaps non-interesting things to say tweet those things, and other people who are interested in those types of tweets follow them.

5. Model-View-Controller Pattern for Web Applications: Spring Framework features a model-view-controller (MVC) pattern framework that simplifies the process of creating interactive web applications. Instead of manually dealing with the complexities of Servlets, HttpServletRequests, HttpServletResponses, and forwarding to JSPs, Spring handles these tasks for you.

Each method in a controller class is mapped to a different request URL, method, or other property of a request. The model is passed from the controller to the view in the form of a Map<String, Object>. The View or view name (String) returned from the controller method causes Spring to forward to the appropriate JSP view. Request and URL path parameters are automatically converted to primitive or complex controller method arguments.

In addition to typical HTML views, Spring can automatically generate plain text views and file download views and XML or JSON entity views. Through all these features, Spring Framework greatly simplifies working in a Servlet container.