Scenarios
This document describes developing Java applications locally, accessing Polaris via Apache Dubbo, and implementing a metadata center.
Prerequisite
Before development, please ensure you have downloaded and installed Java and Maven.
Operation Steps
Step 1: Importing Dependencies
Note:
The metadata center only supports Apache Dubbo 3.x.
<dependency>
<groupId>com.tencent.polaris</groupId>
<artifactId>dubbo-metadatareport-polaris</artifactId>
</dependency>
Step 2: Add Polaris Configuration File
Set the metadata center address in your Dubbo configuration file:
# Polaris metadata center IP address
dubbo.metadata-report.address=polaris://${replace with the Polaris service address}:8091
# Reports application-level metadata.
dubbo.application.metadata-type=remote
Step 3: Start the Application
After the application successfully starts, go to the console to view the service metadata information, as shown in the figure below:
Click the Details button of an interface to view its address discovery metadata.