Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.
- What's New
- Service Overview
- Getting Started
- User Guide
- Best Practices
-
FAQs
- Service Mesh Cluster
- Mesh Management
-
Adding a Service
- What Do I Do If an Added Gateway Does Not Take Effect?
- Why Does It Take a Long Time to Start the Demo Application in Experiencing Service Mesh in One Click?
- Why Can't I Access the page of the Demo Application After It Is Successfully Deployed?
- Why Cannot I Select the Corresponding Service When Adding a Route?
- Performing Grayscale Release
- Videos
Show all
Static Target Service
Introduction
Use dubbo:reference to configure the referenced service provider in the service consumer of the Dubbo service. Use the url option to define the address of the point-to-point direct connection service provider to bypass the Registry and directly call the target service.
Description
If the original Dubbo service uses the .xml configuration file, only the configuration file needs to be modified.
<?xml version="1.0" encoding="UTF-8"?> <beans> <!-- Interfaces that can be called --> <dubbo:reference id="helloService " interface="com.dubbo.service.HelloService " url = "dubbo://helloService:20880" /> </beans>
If an annotation is used to define the referenced target service, only the annotation of the target service in the code needs to be modified.
@Reference(url = "dubbo://helloService:20880") HelloService helloService;
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.