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/02 16:01:59 UTC

[GitHub] [dubbo] neocrm opened a new issue #8665: dubbo 2.7.8 自定义的路由通过@active激活

neocrm opened a new issue #8665:
URL: https://github.com/apache/dubbo/issues/8665


   dubbo 2.7.8 自定义的路由通过@active激活;会出现消费端调用任何服务端都进入这个自定义路由的问题;
   但是;我只想对特定的服务端进行路由;这个怎么实现?或者说,自定义路由有没有作用域这个个说法?


-- 
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


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

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment 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


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

Posted by GitBox <gi...@apache.org>.
CrazyHZM closed issue #8665:
URL: https://github.com/apache/dubbo/issues/8665


   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #8665:
URL: https://github.com/apache/dubbo/issues/8665#issuecomment-924608908


   I don’t know if the above answers can solve your problem, please close the issue temporarily, if you have other questions, you can reopen the issue


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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