-
Notifications
You must be signed in to change notification settings - Fork 26.5k
dubbo-compatible @SPI interface compatible not work #6428
Copy link
Copy link
Closed
Milestone
Description
- Dubbo version: 2.7.7
EG:
SPI interface in apache dubbo
package org.apache.dubbo.common.extension;
/**
* ExtensionFactory
*/
@SPI
public interface ExtensionFactory {
...
}
compatible class with alibaba dubbo
package com.alibaba.dubbo.common.extension;
@Deprecated
public interface ExtensionFactory extends org.apache.dubbo.common.extension.ExtensionFactory {
}
Not ADD @SPI annotation
public static <T> ExtensionLoader<T> getExtensionLoader(Class<T> type) {
.....
if (!withExtensionAnnotation(type)) {
throw new IllegalArgumentException("Extension type (" + type +
") is not an extension, because it is NOT annotated with @" + SPI.class.getSimpleName() + "!");
}
....
return loader;
}In ExtensionLoader#getExtensionLoader will check failed and throw Exception.
BTW, ExtensionLoader not provided compatible class.
Reactions are currently unavailable