Scenarios
This document describes how to develop Java applications locally, access Polaris via Apache Dubbo, and implement service registration and discovery.
Prerequisite
Before development, please ensure you have downloaded and installed Java and Maven.
Operation Steps
Step 1: Importing Dependencies
<dependency>
<groupId>com.tencent.polaris</groupId>
<artifactId>dubbo-registry-polaris</artifactId>
</dependency>
Step 2: Add Polaris Configuration File
Set the registry center address in your Dubbo configuration file:
dubbo.registry.address=polaris://${replace with the Polaris service address}:8091?namespace=test
Step 3: Start the Application
After the application successfully starts, go to the console to view the service registration information, as shown in the figure below: