Most of the java frameworks force you to extend one of their classes or implement one of their interfaces. Example of such an invasive programming model was EJB 2-era stateless session beans, earlier versions of Struts, WebWork, Tapestry.
Spring avoids littering your code with its API. Spring never forces you to implement a Spring-specific interface or extend a Spring-specific class. Instead, the classes often don’t have any indication that they’re being used by Spring.
public class HelloWorld {
public String hello() {
return "Hello World";
}
}
This is a simple, Java class(POJO). Nothing indicates that it's a Spring component. Spring is non-invasive means this class could function equally well in a Spring application as it could in a non-Spring application. Although POJOs are simple they can be powerful.
One of the ways POJOs can become powerful in Spring is by using Dependency Injection.