How to achieve the effect of Spring's @ConditionalOnMissingBean in Dubbo ? #15813
Closed
java-my-life
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-check
Apache Dubbo Component
Java SDK (apache/dubbo)
Details
`
public interface TestProvider {
String getName();
}
@ConditionalOnMissingBean(TestProvider.class)
@DubboService(interfaceClass = TestProvider.class)
public class TestServiceImpl implements TestService {
@OverRide
public String getName() {
return "getName:TestServiceImpl:";
}
}
@DubboService(interfaceClass = TestProvider.class)
public class TestServiceExtImpl extends TestServiceImpl{
@OverRide
public String getName() {
return "TestServiceExtImpl:";
}
}
`
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions