To convert an application that is created using the Spring Framework to an OSGi application and move from the Spring Framework to standards-based technologies, you must modify the application manually. If a Spring application contains only web application archive (WAR) files, you can convert it automatically to run in OSGi Applications, but it still uses the Spring Framework.
In a Spring application, the Spring Framework manages features such as transactions, persistence, and dependency injection, and handles the communication between the servlets in the web container and the classes that handle the business logic of the application.
After you convert the application to an OSGi application that uses OSGi Applications support, the Blueprint Container manages the transactions, persistence and dependency injection.
If the application is an enterprise archive (EAR) file that contains only web application archive (WAR) files, you can convert it automatically. You might convert a Spring application in this way if a WAR file uses other library JAR files that must remain unchanged for the application to work. See Converting an enterprise application to an OSGi application.
Otherwise, you need to identify the Spring components and replace them with the equivalent code to make them plain old Java objects (POJOs), then modify the relevant XML files so that the Blueprint container manages those objects.
At the end of each step, the application is still usable, so you can decide whether to make all, or just some, of these changes.
The following procedure describes these steps in more detail.