容器扩展

扩展说明

用于自定义加载内容的服务容器扩展。

扩展点

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 (implements the Container interface)
    |-resources
        |-META-INF
            |-dubbo
                |-org.apache.dubbo.container.Container (plain text file, content: 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

上次修改时间:2023 年 1 月 2 日:增强英文文档 (#1798) (95a9f4f6c1c)