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/07/28 13:27:26 UTC

[GitHub] [dubbo] xul0038 commented on issue #8212: Dubbo 2.7.8及以上判断Map类型的逻辑有误

xul0038 commented on issue #8212:
URL: https://github.com/apache/dubbo/issues/8212#issuecomment-888308919


   1.创建自定义TypeBuilder
   ```
   public class TreeBuilder implements TypeBuilder , Prioritized {
   
       @Override
       public boolean accept(Type type, Class<?> clazz) {
           if (clazz == null) {
               return false;
           }
           return Tree.class.isAssignableFrom(clazz);
       }
   
       @Override
       public int getPriority() {
           return -1;
       }
   
       @Override
       public TypeDefinition build(Type type, Class<?> clazz, Map<Class<?>, TypeDefinition> typeCache) {
           // balabala...
       }
   }
   ```
   2. `META-INF`下创建`dubbo/internal/org.apache.dubbo.metadata.definition.builder.TypeBuilder`文件
   
   #6306


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