Can I manually expose existing beans from another module?

Yes. You can do so by customizing the configuration of the target module that holds the bean.

There are several ways to do this:

  1. By subscribing to the AcrossModuleBeforeBootstrapEvent in any module that has already started. This event will be published before your target module starts and allows you to customize the module configuration, which includes adding exposed bean types.
  2. By implementing the prepareForBootstrap() method on your own module descriptor and changing the configuration of the target module.
  3. By adding the target module manually as a bean to your application, instead of scanning by name or adding it transitively. Defining the module as a bean creates an instance of AcrossModule, which allows modifying the expose filter.

Exposing additional beans from other modules can be somewhat circuitous. We hope to improve this in future releases of Across.