Third time it's a charm

Once upon a time there was Acegi...moving forward to OSGi ready spring-security is as easy as:

  • Add Spring-Security and Spring libraries to your Eclipse target platform
  • Delete the Acegi libraries in WEB-INF/libs and add Require-Bundles in the OSGi MANIFEST.MF
  • Delete the Spring libraries in WEB-INF/libs and add Require-Bundles in the OSGi MANIFEST.MF
Require-Bundle:
    org.springframework.context,
    org.springframework.core,
    org.springframework.beans,
    org.springframework.context,
    org.springframework.context.support,
    org.springframework.security,
    org.springframework.security.taglibs,
    org.springframework.web,
    org.springframework.web.servlet,
    org.springframework.transaction
  • Run an Eclipse organize imports CTRL+SHIFT+O
  • Replace org.acegi in Spring configuration files with org.springframework.security

That's it. The embedded libraries in the monolithic war have been replaced with OSGi bundles.

This post is part of a series about an OSGi experiment: Migrate a monolith to a modular OSGi application architecture.

The Beginning of an OSGi Experiment

Building OSGi ready pebble with Maven

▶︎ Third time it's a charm

Extracting the first OSGi bundle

▷ ...


Header cover Photo by Matthew Henry from Burst