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/11/09 02:38:40 UTC

[GitHub] [dubbo] AlbumenJ commented on a change in pull request #9187: bugfix ExtensionLoader can not inject by type properly.

AlbumenJ commented on a change in pull request #9187:
URL: https://github.com/apache/dubbo/pull/9187#discussion_r745244137



##########
File path: dubbo-common/src/main/java/org/apache/dubbo/common/extension/Inject.java
##########
@@ -22,8 +22,20 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import static org.apache.dubbo.common.extension.Inject.InjectType.ByName;
+
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.TYPE, ElementType.METHOD})
-public @interface DisableInject {
+public @interface Inject {
+    // whether enable injection or not
+    boolean enable() default true;
+
+    // inject type default by name injection
+    InjectType type() default ByName;
+
+    enum InjectType{
+        ByName,
+        ByType
+    }

Review comment:
       What is purpose of changing this annotation




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