服务容器扩展,用于自定义加载内容。
org.apache.dubbo.container.Container
java org.apache.dubbo.container.Main spring jetty log4j
org.apache.dubbo.container.spring.SpringContainer
org.apache.dubbo.container.spring.JettyContainer
org.apache.dubbo.container.spring.Log4jContainer
Maven 项目结构:
src
|-main
|-java
|-com
|-xxx
|-XxxContainer.java (实现Container接口)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.container.Container (纯文本文件,内容为:xxx=com.xxx.XxxContainer)
XxxContainer.java:
package com.xxx;
org.apache.dubbo.container.Container;
public class XxxContainer implements Container {
public Status start() {
// ...
}
public Status stop() {
// ...
}
}
META-INF/dubbo/org.apache.dubbo.container.Container:
xxx=com.xxx.XxxContainer