Class SpringLoaderPlugin

java.lang.Object
org.pf4j.Plugin
cn.sliew.carp.framework.pf4j.spring.PrivilegedSpringPlugin
cn.sliew.carp.framework.pf4j.spring.SpringLoaderPlugin

public abstract class SpringLoaderPlugin extends PrivilegedSpringPlugin
Allows a plugin to scan packages for beans and load Spring Configurations.
  • Field Details

    • pluginContext

      protected org.springframework.context.annotation.AnnotationConfigApplicationContext pluginContext
      The plugin context.
  • Constructor Details

    • SpringLoaderPlugin

      public SpringLoaderPlugin(org.pf4j.PluginWrapper wrapper)
      Constructor to be used by plugin manager for plugin instantiation. Your plugins have to provide constructor with this exact signature to be successfully loaded by manager.
      Parameters:
      wrapper - plugin wrapper
  • Method Details

    • registerBeanDefinitions

      public void registerBeanDefinitions(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Description copied from class: PrivilegedSpringPlugin
      Provides the opportunity to register bean definitions from the plugin into the application's registry.
      Specified by:
      registerBeanDefinitions in class PrivilegedSpringPlugin
      Parameters:
      registry - registry
    • getPackagesToScan

      public List<String> getPackagesToScan()
      Specify plugin packages to scan for beans.
      Returns:
      plugin packages to scan for beans
    • getClassesToRegister

      public List<Class> getClassesToRegister()
      Specify plugin classes to register with the plugin context.
      Returns:
      plugin classes to register with the plugin context