Dynamic extensions loading allows to add selected extension to CleverBus application OpenHub application independently by each other.
...
If you want to add one specific extension to CleverBus application to OpenHub application then follow the following steps:
0) Prerequisite - extension configuration loader must be initialized
Code Block | ||
---|---|---|
| ||
<bean class="org.openhubframework.cleverbusopenhub.core.common.extension.PropertiesExtensionConfigurationLoader" depends-on="camelContext"> <constructor-arg ref="confProperties"/> </bean> |
...
1) add Maven dependency to specific extension
For example add dependency to ARES extenion File upload extension:
Code Block |
---|
<groupId>org.cleverbusopenhubframework.openhub.extensions</groupId> <artifactId>ares<<artifactId>file-upload</artifactId> |
...
2) add Spring configuration of specific extension
extensions.cfg (defined directly in CleverBus sc-in OpenHub framework web-admin module) or extensions0.cfg (has higher priority) defines references to Spring root configuration files for each extension. Each property has to starts with context.ext prefix.
...
Code Block |
---|
context.ext1 = classpath:/META-INF/sp_ext_aresfileupload.xml |
sp_ext_aresfileupload.xml file can contain "unlimited" another Spring configuration configurations specific for ARES File upload extension, imports other configurations for the extension, choose between XML, annotation or Java config style etc.
...