Eureka is an important registry implementation in the Seata component.
Eureka into your Seata project, make sure that the Eureka Server service is already running in the background. If you are not familiar with the basic usage of Eureka, you can refer to the Eureka Quick Start for reference. It is recommended to use Eureka version
2.X or above.
The steps to integrate Eureka registry into Seata are very simple, and can be roughly divided into "Adding Maven Dependencies" and "Configuring the Registry".
Adding Maven Dependencies
First, you need to add the Maven dependency of
spring-cloud-starter-netflix-eureka-client to your project's
pom.xml file. It is recommended to use Seata
1.4.0+. For the version relationship between
spring-cloud-starter-alibaba-seata and the corresponding microservice version, please refer to the Version Description.
<!-- seata dependency -->
<version>2.1.2.RELEASE and above</version>
<!-- eureka client dependency -->
<version>2.0.0.RELEASE and above</version>
Configuring the Registry on the Client Side
my_test_tx_group: seata-server # Configure the corresponding value of registry.eureka.application on the Server side here
Server-side configuration of the registry center
type = "eureka"
serviceUrl = "http://localhost:8761/eureka"
application = "seata-server"
weight = "1"
After that, when Seata-Server is started, the Server-side service will appear in the registry center list in the Eureka console. After configuring the Client, you can start the application to experience the Seata service.