Skip to content

plugins development guideline

许杰 edited this page Sep 14, 2020 · 1 revision

plugins development guideline

SPI agreement

plugins include multiple plugin, every plugin configure the aop pointcut independently.

plugin is base on java spi, so we need some configuration at the directory path Resource/META-INF/services.

For agent mode, the file name is io.manbang.zodiac.traffichandler.TrafficHandler, like:

main
└── resources
    └── META-INF
        └── services
            └── io.manbang.zodiac.traffichandler.TrafficHandler

For attach mode, the file name is io.manbang.zodiac.traffichandler.AttachTrafficHandler, like:

main
└── resources
    └── META-INF
        └── services
            └── io.manbang.zodiac.traffichandler.AttachTrafficHandler

Next, we only need to add plugin class name to corresponding file.