mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
适配eureka
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<!-- 使用nacos注册中心
|
||||
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
@@ -56,8 +56,13 @@
|
||||
<artifactId>nacos-client</artifactId>
|
||||
<version>${nacos-client.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- 注册中心end -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
@@ -1,8 +1,11 @@
|
||||
server.port=3333
|
||||
spring.application.name=book-service
|
||||
|
||||
# eureka注册中心
|
||||
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
|
||||
|
||||
# nacos注册中心
|
||||
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
|
||||
#spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
|
||||
|
||||
# consumer不需要检查provider是否启动
|
||||
dubbo.consumer.check=false
|
||||
|
@@ -39,7 +39,7 @@
|
||||
<!-- 使用nacos注册中心
|
||||
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
@@ -50,8 +50,14 @@
|
||||
<artifactId>nacos-client</artifactId>
|
||||
<version>${nacos-client.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- 注册中心end -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
|
@@ -1,8 +1,11 @@
|
||||
server.port=2222
|
||||
spring.application.name=story-service
|
||||
|
||||
# eureka注册中心
|
||||
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
|
||||
|
||||
# nacos注册中心
|
||||
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
|
||||
#spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
|
||||
|
||||
# dubbo配置
|
||||
dubbo.protocol.name=dubbo
|
||||
|
Reference in New Issue
Block a user