Extension Point Load Extension
Expansion Description
The loading container of the extension point itself, which can load the extension point from different containers.
Extension ports
org.apache.dubbo.common.extension.ExtensionFactory
Extended configuration
<dubbo:application compiler="jdk" />
Known extensions
org.apache.dubbo.common.extension.factory.SpiExtensionFactory
org.apache.dubbo.config.spring.extension.SpringExtensionFactory
Extended example
Maven project structure:
src
|-main
|-java
|-com
|-xxx
|-XxxExtensionFactory.java (implements ExtensionFactory interface)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.common.extension.ExtensionFactory (plain text file, content: xxx=com.xxx.XxxExtensionFactory)
XxxExtensionFactory.java:
package com.xxx;
import org.apache.dubbo.common.extension.ExtensionFactory;
public class XxxExtensionFactory implements ExtensionFactory {
public Object getExtension(Class<?> type, String name) {
//...
}
}
META-INF/dubbo/org.apache.dubbo.common.extension.ExtensionFactory:
xxx=com.xxx.XxxExtensionFactory
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified January 2, 2023: Enhance en docs (#1798) (95a9f4f6c1)