You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/03 03:28:52 UTC

[GitHub] [dubbo] plusmancn commented on issue #8665: dubbo 2.7.8 自定义的路由通过@active激活

plusmancn commented on issue #8665:
URL: https://github.com/apache/dubbo/issues/8665#issuecomment-912226975


   copy from `@Activate` source code, try to use the value and group to restrict activation condition.
   ```java
   public @interface Activate {
       /**
        * Activate the current extension when one of the groups matches. The group passed into
        * {@link ExtensionLoader#getActivateExtension(URL, String, String)} will be used for matching.
        *
        * @return group names to match
        * @see ExtensionLoader#getActivateExtension(URL, String, String)
        */
       String[] group() default {};
   
       /**
        * Activate the current extension when the specified keys appear in the URL's parameters.
        * <p>
        * For example, given <code>@Activate("cache, validation")</code>, the current extension will be return only when
        * there's either <code>cache</code> or <code>validation</code> key appeared in the URL's parameters.
        * </p>
        *
        * @return URL parameter keys
        * @see ExtensionLoader#getActivateExtension(URL, String)
        * @see ExtensionLoader#getActivateExtension(URL, String, String)
        */
       String[] value() default {};
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org