-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dubbo provided by #11390
feat: dubbo provided by #11390
Conversation
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE}) | ||
@Inherited | ||
public @interface DubboProvidedbBy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public @interface DubboProvidedbBy { | |
public @interface ProvidedbBy { |
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE}) | ||
@Inherited | ||
public @interface ProvidedbBy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public @interface ProvidedbBy { | |
public @interface ProvidedBy { |
@@ -518,9 +518,8 @@ private boolean checkMeshConfig(Map<String, String> referenceParameters) { | |||
|
|||
String providedBy = referenceParameters.get(PROVIDED_BY); | |||
if (StringUtils.isEmpty(providedBy)) { | |||
throw new IllegalStateException("In mesh mode, the providedBy of ReferenceConfig is must be set"); | |||
throw new IllegalStateException("In mesh mode, the providedBy or dubboProvidedBy of ReferenceConfig is must be set"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new IllegalStateException("In mesh mode, the providedBy or dubboProvidedBy of ReferenceConfig is must be set"); | |
throw new IllegalStateException("In mesh mode, the providedBy of ReferenceConfig is must be set"); |
@@ -51,7 +51,6 @@ public interface ReferenceAttributes { | |||
String PARAMETERS = "parameters"; | |||
|
|||
String PROVIDED_BY = "providedBy"; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
@@ -78,6 +79,17 @@ public static void convertReferenceProps(Map<String, Object> attributes, Class d | |||
interfaceName = defaultInterfaceClass.getName(); | |||
} | |||
Assert.notEmptyString(interfaceName, "The interface class or name of reference was not found"); | |||
Class<?> clazz = ClassUtils.resolveClass(interfaceName, defaultInterfaceClass.getClassLoader()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class<?> clazz = ClassUtils.resolveClass(interfaceName, defaultInterfaceClass.getClassLoader()); | |
Class<?> clazz = getInterfaceClass(); |
|
||
/** | ||
* Class-level annotation used for declaring Dubbo interface. | ||
* @DubboProvidedbBy("dubbo-samples-xds-provider") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @DubboProvidedbBy("dubbo-samples-xds-provider") | |
* @ProvidedBy("dubbo-samples-xds-provider") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please submit some related docs to dubbo-website |
* mytang0/3.2: Enhance service discovery update interval (apache#11223) Metrics code opt: redundant, modifier, magic (apache#11553) Perfect some code (apache#11533) feat: dubbo provided by (apache#11390)
* mytang0/3.2: (33 commits) Fix conflict Update codecov config (apache#11580) Set timeout value to string (apache#11565) Skip mapping retry if metadata config is invalid (apache#11323) Fix stackoverflow in SerializeSecurityConfigurator (apache#11561) Revert clear response operation of timeoutfilter (apache#11562) Fix hessian2 serializable check (apache#11573) feat: fix oom (apache#11571) Enhance service discovery update interval (apache#11223) Metrics code opt: redundant, modifier, magic (apache#11553) Perfect some code (apache#11533) feat: dubbo provided by (apache#11390) Enhance serializable check option (apache#11460) Fix config absent when refresh (apache#11505) Enhance json util check (apache#11501) Fix the bug in LFUCache#put() method (apache#11538) Bump maven-assembly-plugin from 3.1.0 to 3.4.2 (apache#11547) Bump consul-api from 1.4.2 to 1.4.5 (apache#11545) Bump maven-core from 3.8.7 to 3.9.0 (apache#11546) Bump bytebuddy.version from 1.12.22 to 1.13.0 (apache#11548) ... # Conflicts: # dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
related to #10374