Class SpringLoader
java.lang.Object
cn.sliew.carp.framework.pf4j.spring.SpringLoader
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class SpringLoader
extends Object
implements org.springframework.context.ApplicationContextAware
Configures a plugin context. Also allows for package scanning and bean promotion from a plugin to
the application's context.
-
Constructor Summary
ConstructorsConstructorDescriptionSpringLoader(ClassLoader pluginClassLoader, List<String> packagesToScan, List<Class> classesToRegister, org.springframework.context.annotation.AnnotationConfigApplicationContext pluginContext) Spring loader -
Method Summary
Modifier and TypeMethodDescriptionvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
SpringLoader
public SpringLoader(ClassLoader pluginClassLoader, List<String> packagesToScan, List<Class> classesToRegister, org.springframework.context.annotation.AnnotationConfigApplicationContext pluginContext) Spring loader- Parameters:
pluginClassLoader- class loaderpackagesToScan- packageclassesToRegister- classpluginContext- application context
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-